gsap+svg实现酷炫自定义滑动取值器拖动滑竿效果代码
代码语言:html
所属分类:拖放
代码描述:gsap+svg实现酷炫自定义滑动取值器拖动滑竿效果代码
代码标签: gsap svg 酷炫 自定义 滑动 取值器 拖动 滑竿
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
body {
background-color: #1b2346;
overflow: hidden;
text-align:center;
display: flex;
align-items: center;
justify-content: center;
}
body,
html {
height: 100%;
width: 100%;
margin: 0;
padding: 0;
}
svg {
width: 100%;
height: 100%;
visibility: hidden;
}
text {
font-size: 42px;
text-anchor: middle;
fill: #FFF;
}
</style>
</head>
<body>
<svg id="mainSVG" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1080 1080">
<defs>
<path id="panelEnd" d="M854.73,500h-84.08c-7.71,0-15.09,3.09-20.5,8.58l-28.35,28.77h-16.62c-5.64,0-11.02-2-15.6-5.3-3.03-2.18-7.32-3.54-12.07-3.54-9.22,0-16.69,5.11-16.69,11.42s7.47,11.42,16.69,11.42c4.76,0,9.06-1.37,12.09-3.56,4.58-3.31,9.97-5.32,15.62-5.32h16.39l28.54,28.95c5.41,5.49,12.8,8.58,20.5,8.58h84.08c22,0,40-18,40-40h0c0-22-18-40-40-40Z" />
<linearGradient id="trackGrad" x1="178.57" y1="540" x2="717.57" y2="540" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#00c4f5"/>
<stop offset="1" stop-color="#005fde"/>
</linearGradient>
<linearGradient id="trackGrad-2" x1="188.07" y1="540" x2="708.07" y2="540" xlink:href="#trackGrad"/>
<linearGradient id="trackGrad2" x1="178.57" y1="540" x2="717.57" y2="540" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#88FB3F"/>
<stop offset="1" stop-color="#27EDED"/>
</linearGradient>
<linearGradient id="trackGrad2-2" x1="188.07" y1="540" x2="708.07" y2="540" xlink:href="#trackGrad2"/>
<radialGradient id="panelGrad" cx="238.47" cy="539.58" fx="238.47" fy="539.58" r="251.97" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#fff"/>
<stop offset=".13" stop-color="#fff"/>
<stop offset=".75" stop-color="#fff" stop-opacity=".051"/>
</radialGradient>
<radialGradient id="panelGrad2" cx="238.47" cy="539.58" fx="238.47" fy="539.58" r="251.97" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#fff"/>
<stop offset=".13" stop-color="#fff"/>
<stop offset=".75" stop-color="#fff" stop-opacity=".051"/>
</radialGradient>
<!-- <radialGradient id="panelGrad-2" cx="669.8" fx="669.8" r="87.58" xlink:href="#panelGrad"/> -->
</defs>
<!-- <rect width=&qu.........完整代码请登录后点击上方下载按钮下载查看
网友评论0