当前位置: 首页 > 工具软件 > Switch CSS > 使用案例 >

html switch开关实现隐藏,css 实现漂亮switch 开关

沈骞仕
2023-12-01

.switch-wrapper{

display: block;

right: 68px;

border-radius: 2px;

text-align: center;

color: #36383c;

cursor: pointer;

padding: 4px 8px;

height: 24px;

line-height: 20px;

background-color: rgb(0,95,129,.1);

}

.banner-switch{

width: 48px;

height:24px ;

color: #fff;

border-radius: 12px;

background-color: #03a9f0;

vertical-align: middle;

display: inline-block;

position: relative;

cursor: pointer;

}

.banner-switch-close{

width: 100%;

height: 100%;

border-radius: 12px;

background-color: #03a9f0;

color: #fff;

font-size: 12px;

line-height: 24px;

padding-left: 4px;

}

.banner-switch-btn{

position: absolute;

top: 1px;

left: calc(100%-21px);

width: 20px;

height: 20px;

border-radius: 50%;

border: 0.5px solid #999;

background-color: #fff;

transition: left .3s;

}

.right-switch{

left: 1px;

}

 类似资料: