js+svg实现胶囊开关点击切换效果代码

代码语言:html

所属分类:其他

代码描述:js+svg实现胶囊开关点击切换效果代码

代码标签: js svg 胶囊 开关 点击 切换

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

<html lang="en">

<head>
    <meta charset="UTF-8">
<style>
#svg{  position:absolute;  margin:auto;   top:0;bottom:0;left:0;right:0;}#pill{fill:gold;}#thePath{fill:skyBlue}.pe-n{pointer-events:none;}body{background:#1e88e5;}
</style>
</head>

<body><svg id="svg" width="100" viewBox="-10 -10 470 220"><defs><radialGradient id="rg" cx=".5" cy="0" r=".9" gradientUnits="objectBoundingBox"><stop offset="0%" stop-color="white" stop-opacity="0"></stop><stop offset="60%" stop-color="white" stop-opacity="0"></stop><stop offset="60%" stop-color="white" stop-opacity=".1&.........完整代码请登录后点击上方下载按钮下载查看

网友评论0