css布局实现绿色实体开关效果代码

代码语言:html

所属分类:布局界面

代码描述:css布局实现绿色实体开关效果代码

代码标签: 绿色 实体 开关 效果

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


<!DOCTYPE html>
<html lang="en" >

<head>

  <meta charset="UTF-8">
  

  
  
  
<style>
body {
	margin: 0;
	padding: 0;
	width: 100vw;
	height: 100vh;
	display: flex;
	justify-content: center;
	align-items: center;
	background-color: #e6e6e6;
	background: linear-gradient(-45deg, #00000000, #0000000d);
}

body *,
body *:before,
body *:after {
	box-sizing: border-box;
	transition: all 0.2s ease-in 0s;
}

input[type="checkbox"] {
	display: none;
}

label {
	padding: 0.2vmin;
	background-color: #151515;
	box-shadow: #00000026 0 -0.5vmin 1vmin 1vmin, 0 0 0.25vmin 0.5vmin #000,
		0 0 1vmin 1vmin #111 inset;
	cursor: pointer;
	margin: 5vmin;
	border: 2vmin solid #111111;
	border-color: #010101 #121212 #222222 #181818;
}

label:before,
label:after {
	content: "O";
	width: 100%;
	min-width: 10vmin;
	height: 20vmin;
	float: left;
	text-align: center;
	background: #087f0c;
	box-sizing: borde.........完整代码请登录后点击上方下载按钮下载查看

网友评论0