代码拉取完成,页面将自动刷新
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>虚拟风按钮</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.css">
<style>
ul {
width: 310px;
background: #ebf5fc;
border-radius: 10px;
padding: 10px;
box-shadow: -2px -2px 5px white, 3px 3px 5px rgba(0, 0, 0, 0.1);
display: flex;
flex-wrap: wrap;
justify-content: space-around;
margin: 50px auto;
}
ul li {
position: relative;
list-style: none;
text-align: center;
margin: 15px;
}
label .icon-box .fa {
font-size: 30px;
color: #6a9bd8;
}
.icon-box {
width: 60px;
height: 60px;
background: #ebf5fc;
display: flex;
justify-content: center;
align-items: center;
box-shadow: -2px -2px 5px white, 3px 3px 5px rgba(0, 0, 0, 0.1);
border-radius: 10px;
}
label {
position: relative;
cursor: pointer;
}
input[type="checkbox"] {
position: absolute;
opacity: 0;
}
input:checked~.icon-box {
box-shadow: inset -2px -2px 5px white, inset 3px 3px 5px rgba(0, 0, 0, 0.1);
}
input:checked~.icon-box .fa {
transform: scale(0.95);
}
</style>
</head>
<body>
<ul>
<li>
<label>
<input type="checkbox" checked="">
<div class="icon-box">
<i class="fa fa-home"></i>
</div>
</label>
</li>
<li>
<label>
<input type="checkbox">
<div class="icon-box">
<i class="fa fa-phone"></i>
</div>
</label>
</li>
<li>
<label>
<input type="checkbox">
<div class="icon-box">
<i class="fa fa-plane"></i>
</div>
</label>
</li>
<li>
<label>
<input type="checkbox">
<div class="icon-box">
<i class="fa fa-snowflake-o"></i>
</div>
</label>
</li>
<li>
<label>
<input type="checkbox">
<div class="icon-box">
<i class="fa fa-battery-full"></i>
</div>
</label>
</li>
<li>
<label>
<input type="checkbox">
<div class="icon-box">
<i class="fa fa-code"></i>
</div>
</label>
</li>
</ul>
</body>
</html>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。