TweenMax+svg实现气球文字提示拖拽滑动取值器代码

代码语言:html

所属分类:拖放

代码描述:TweenMax+svg实现气球文字提示拖拽滑动取值器代码

代码标签: TweenMax svg 气球 文字 提示 拖拽 滑动 取值器

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


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

<head>

  <meta charset="UTF-8">
  

  <link href='https://fonts.googleapis.com/css?family=Ropa+Sans' rel='stylesheet' type='text/css'>
<meta name="viewport" content="width=device-width, initial-scale=1">
  
  
  
<style>
body {
  background-color: #03A9F4;
  overflow: hidden;
  font-family: 'Ropa Sans', sans-serif;
  text-align:center;
    display: flex;
  align-items: center;
  justify-content: center;    
}

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


svg {
  width: 150%;
  height:150%;
  visibility: hidden;
}

.upText,
.downText {
  text-anchor: middle;
  font-weight: 700;
  font-size: 14px;
  fill: #03A9F4;
  letter-spacing: 0.4px;
  user-select: none;
  -webkit-user-select: none;
  pointer-events: none;
  text-rendering: optimizeSpeed;
}

.upText {
  font-size: 24px;
}

#dragger{
-webkit-tap-highlight-color: rgba(0,0,0,0); 
}

.downText {
  letter-spacing: -0.4px;
}
</style>




</head>

<body >
  <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"  viewBox="0 0 600 600">
    <defs>
      <filter id="goo" color-interpolation-filters="sRGB">
        <feGaussianBlur in="SourceGraphic" stdDeviation="8" result="blur" />
        <feColorMatrix in="blur" mode="matrix" values="1 0 0 0 0  0 1 0 0 0  0 0 1 0 0  0 0 0 21 -7" result="cm" />

      </filter>
    </defs>
    <g id="dragGroup">
      <path id="dragBar" fill="#FFFFFF" d="M447,299.5c0,1.4-1.1,2.5-2.5,2.5h-296c-1.4,0-2.5-1.1-2.5-2.5l0,0c0-1.4,1.1-2.5,2.5-2.5
		h296C445.9,297,447,298.1,447,299.5L447,299.5z" />
      <g id="displayGroup">
        <g id="gooGroup" filter="url(#goo)">
          <circle id="display" fill="#FFFFFF" cx="146" cy="299.5" r="16" />
          <circle id="dragger" fill="#FFFFFF"  stroke="#03A9F4" stroke-width="0" cx="146" cy="299.5" r="15" />

        </g>
        <text class="downText" x="146" y="304">0</text>
        <text class="upText" x="145" y="266">0</text>
      </g>


    </g>
  </svg>

<script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/TweenMax.min.js"></script>
<script type="text/javascript" src="//repo.bfw.wik.........完整代码请登录后点击上方下载按钮下载查看

网友评论0