<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>前端开关按钮</title>
<style type="text/css">
* {
margin: 0px;
padding: 0px;
}
.switchOn {
display: inline-block;
width: 50px;
height: 22px;
border-radius: 22px;
background-color: #009f3c;
position: relative;
vertical-align: top;
cursor: pointer;
}
.switchOn em {
display: inline-block;
width: 18px;
height: 18px;
border-radius: 50%;
background: #FFFFFF;
position: absolute;
right: 2px;
top: 2px;
transition: all 0.5s linear;
}
.switchOn:after {
content: 'ON';
font-size: 12px;
position: absolute;
前端开关按钮
最新推荐文章于 2022-08-25 01:01:54 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)