CSS中的&是什么意思
如源码:
ul{
margin-bottom: 20px;
& >li {
margin-bottom: 0;
}
}
& 表示嵌套的上一级
这是sass的语法,代表上一级选择器
解释成CSS代码如下
ul{margin-bottom: 20px;}
ul > li {margin-bottom: 0;}
以上就是CSS中的&是什么意思的详细内容,更多请关注米米素材网其它相关文章!
CSS中的&是什么意思
如源码:
ul{
margin-bottom: 20px;
& >li {
margin-bottom: 0;
}
}
& 表示嵌套的上一级
这是sass的语法,代表上一级选择器
解释成CSS代码如下
ul{margin-bottom: 20px;}
ul > li {margin-bottom: 0;}
以上就是CSS中的&是什么意思的详细内容,更多请关注米米素材网其它相关文章!
发表评论