TweenMax+MorphSVGPlugin+svg实现寿司开关点击效果代码

代码语言:html

所属分类:表单美化

代码描述:TweenMax+MorphSVGPlugin+svg实现寿司开关点击效果代码

代码标签: TweenMax MorphSVGPlugin svg 寿司 开关 点击

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开


<!DOCTYPE html>
<html lang="en" >

<head>

  <meta charset="UTF-8">
  

  
  
  
<style>
body {
  background-color:#0CB2E3;
  overflow: hidden;
  text-align:center;
}

body,
html {
  height: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
}


svg{
 
  width:100%;
  height:100%;
  visibility:hidden;
 -webkit-tap-highlight-color:transparent;
}

.hit{

 cursor:pointer; 
 -webkit-tap-highlight-color:transparent;
}


.shadow{
 mix-blend-mode:multiply;
}
</style>



</head>

<body >
  <svg class="sushiSVG" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 800 600">
  <defs>
    <clipPath id="salmonMask">
      <rect class="salmonMask" x="261.5" y="246" width="101" height="106" rx="20" ry="20" fill="red"/>
    </clipPath>
  </defs>

 <!-- <rect width="100%" height="100%" fill="#0CB2E3"/> -->
<path class="shadow" d="M943.5,583c0,18.26,2,94.51-.7,113.64C937.94,731,908.27,755.12,874.26,756c-10.49.27-196.39,2.4-278.61,0-41.25-1.2-72.27-43.66-99.88-71.27l-276.5-276.5c-2.41-2.41-4.77-4.91-7.25-7.25,25.14,24.88,60.9,20,93.12,20,44.49,0,198.12.21,230.44,0,20.47-.13,39.53-6.41,53.93-21.58,15.76-16.61,19-37,19-58.79v-72c0-25.44-.64-49.51-20-69.1,22.74,24.16,277.67,277.67,301.25,301.25C913,524,943.5,547.24,943.5,583Z" fill="#333" opacity="0.23"/>
      <rect class="seaweed" x="191.5" y="179" width="417" height="242" rx="69" ry="69" fill="#333"/>
      <rect class="rice" x="216.5" y="203.5" width="191" height="191" rx="43" ry="43" fill="#EFE9F4"/>
      <g class="salmon">
        <rect class="salmonBase" x="261.5" y="246" width="101" height="106" rx="20" ry="20" fill="#ff6b6c"/>
        <g clip-path="url(#salmonMask)">
          <g class="salmonLines">
            <line x1="183" y1="321.5" x2="422" y2="197.5" fill="none" stroke="#ffa1a2" stroke-miterlimit="10" stroke-width="4"/>
            <line x1="183" y1="351.5" x2="422" y2="227.5" fill="none" stroke="#ffa1a2" stroke-miterlimit="10" stroke-width="4"/>
            <line x1="183" y1="381.5" x2="422" y2="257.5" fill="none" stroke="#ffa1a2" stroke-miterlimit="10" stroke-width="4"/>
            <line x1="183" y1="411.5" x2="422" y2="287.5" fill="none" stroke="#ffa1a2" stroke-miterlimit="10" stroke-width="4"/>
            <line x1="183" y1="441.5" x2="422" y2="317.5" fill="none" stroke="#ffa1a2" stroke-miterlimit="10" stroke-width="4"/>
            <line x1="183" y1="291.5" x2="422" y2="167.5" fill="none" stroke="#ffa1a2" stroke-miterlimit="10" stroke-width="4"/>
          </g>
        </g>
       <rect class="salmonEdge" x="261.5" y="246" width="101" height="106" rx="20" ry="20" fill="transparent&.........完整代码请登录后点击上方下载按钮下载查看

网友评论0