发表于: 2018-07-10 23:36:11
1 594
2018.7.10
今天完成的事情:
1.完成任务十二
2.开始任务十三
明天计划的事情:
1.完成任务十三
遇到的问题:
收获:
通过任务十二加深了对sass混合器的理解
1.变量的使用
$c-white: #ffffff;
1.混合器的传参
@mixin flex-c($h:center, $v:center) {
display: flex;
justify-content: $h;
align-items: $v;
}
2.&的使用
:nth-child选择器的使用
:nth-child(n) 选择器匹配父元素中的第 n 个子元素,利用该选择器可以有效减少类名量
ul {
margin: 0 3%;
list-style: none;
padding: 0;
font-size: $fs-2;
color: $c-darkgray;
li {
@include li-c;
height: 1rem;
img {
padding: 0 .2rem;
width: .24rem;
height: .23rem;
}
&:nth-child(2),
&:nth-child(3),
&:nth-child(4),
&:nth-child(5) {
>span {
padding: 0 .2rem;
&:nth-child(1) {
flex-shrink: 0;
color: $c-gray;
border-right: 1px solid $c-gray;
}
}
.redexplain {
color: $c-red !important;
}
}
}
.specialli {
height: auto;
}
}
评论