css+js实现可换背景色的透明checkbox开关效果代码
代码语言:html
所属分类:布局界面
代码描述:css+js实现可换背景色的透明checkbox开关效果代码
代码标签: css js 换 背景色 透明 checkbox 开关
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
body {
background-color: #555;
display: grid;
place-items: center;
height: 100vh;
width: 100vw;
}
.switch {
position: absolute;
display: inline-block;
width: 180px;
height: 68px;
}
.switch input {
opacity: 0;
width: 0;
height: 0;
}
.slider {
position: absolute;
display: flex;
justify-content: flex-start;
align-items: center;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
-webkit-transition: 0.65s cubic-bezi.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0