今天来练习切这个画面
<ol class="list">
<li>
<i class="fa fa-file-text" aria-hidden="true"></i>
收到订单
</li>
<li class="active">
<i class="fa fa-archive" aria-hidden="true"></i>
捡货中
</li>
<li>
<i class="fa fa-truck" aria-hidden="true"></i>
运送中
</li>
<li>
<i class="fa fa-check-circle" aria-hidden="true"></i>
送达
</li>
</ol>
@import url("https://fonts.googleapis.com/css?family=Noto+Sans+TC:100,300,400,500,700,900&display=swap");
@import url("https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css");
* {
margin: 0;
padding: 0;
list-style: none;
}
html, body{
height: 100%;
}
body{
display: flex;
align-items: center;
background-color: #546377;
}
.list{
display: flex;
}
.list li{
font-family: "Noto Sans TC", sans-serif;
display: flex;
flex-direction: column;
justify-content: center;
text-align: center;
width: 100px;
height: 100px;
background-color: #fff;
border-radius: 50%;
}
.list{
width: 100%;
display: flex;
justify-content: center;
}
.list li .fa{
font-size: 25px;
margin-bottom: 5px;
}
.list li + li{
margin-left: 100px;
}
.list li 设定 position: relative; 将连接线固定在这个区块范围
用加号选取器设定除了第一个li没有连接线条以外,其他都要加上
.list li{
font-family: "Noto Sans TC", sans-serif;
text-align: center;
display: flex;
flex-direction: column;
justify-content: center;
width: 100px;
height: 100px;
background-color: #fff;
border-radius: 50%;
position: relative;
}
.list li + li::before{
content: '';
position: absolute;
top:0;
bottom:0;
left:-100px;
margin: auto;
width: 100px;
height: 5px;
background-color: #fff;
}
.list li{
font-family: "Noto Sans TC", sans-serif;
text-align: center;
display: flex;
flex-direction: column;
justify-content: center;
width: 100px;
height: 100px;
background-color: #fff;
background-image: linear-gradient(9deg, #185a9d, #43cea2);
border-radius: 50%;
position: relative;
font-size: 20px;
color:#fff;
box-shadow: 0px 0px 0px 4px #fff;
}
.list li + li::before{
content: '';
position: absolute;
top:0;
bottom:0;
z-index: -1;
box-shadow: 0px 0px 0px 3px #fff;
margin: auto;
left: -100px;
width: 100px;
height: 5px;
background-color: #43cea2;
}
使用~选取器 设定在class="active"之後的li背景色彩都变成灰色
.list li.active ~ li{
background-image: linear-gradient(9deg, #999 ,#ccc);
}
.list li.active ~ li::before{
background-color: #999;
}
参考资料: 金鱼都能懂的这个网页画面怎麽切 : 订单进度条
以上为个人学习笔记整理
若有错误,欢迎指正
<<: Day15 Vue directives(v-for)下
>>: Day 15 - [语料库模型] 03-语料读取&资料格式转换
挑战目标: MockNative Camp 今天来看一下在各种页面中是否有遗漏教师的栏位 这边整理一...
变数宣告 // 宣告区域变数 let local_var = 123; 不可变变数 let immu...
图片是网站关键的视觉元素,更不用说电商网站了,相信大家都会在图片下功夫,让商品能够更加吸引顾客购买。...
前言 大家好,我是 Leo,这是我第一次参加 IT 铁人,心里满是期待。过去只有在 Medium (...
Lighthouse 一款在 Google Chrome 上安装的扩充套件,用来检测网站的效能,Li...