flex布局实现三点筛子
flex布局实现三点筛子

html:
<div class="box"> <span class="item"></span> <span class="item"></span> <span class="item"></span> </div>
css:
<style>
* {
margin: 0;
padding: 0;
}
html,
body {
width: 100%;
height: 100%;
}
body {
background-color: #2b2b2b;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
}
.box {
width: 200px;
height: 200px;
background-color: #e7e7e7;
border-radius: 5px;
display: flex;
justify-content: space-between;
align-items: flex-start;
padding: 20px;
/* 投影--阴影 内阴影 */
box-shadow: inset 6px 6px 2px rgba(0, 0, 0, 0.2),
inset -6px -6px 2px rgba(0, 0, 0, 0.2);
}
.item {
width: 32px;
height: 32px;
background-color: #333333;
border-radius: 16px;
/* 项目 添加 内阴影 */
box-shadow: inset 3px 2px 2px #111111, inset -3px 2px 2px #555555;
transform: rotate(90deg);
}
/* 第1个点 */
.item:first-child {
align-self: flex-start;
}
/* 第2个点 我当前这个项目 现在在哪里*/
.item:nth-of-type(2) {
align-self: center;
}
/* 第3个点 */
.item:last-child {
align-self: flex-end;
}
</style>
吐槽一下


还没有留言,还不快点抢沙发?