文章详情页
什么是“&”在“&.sub-title”中是否表示在scss中?
浏览:242日期:2024-05-11 11:37:08
(adsbygoogle = window.adsbygoogle || []).push({}); 如何解决什么是“&”在“&.sub-title”中是否表示在scss中??
该&串接的父类,从而导致.title.sub-title(而不是.title .sub-title如果&被省略)。
结果是,与&匹配的元素与title和sub-title类都匹配:
<div class=’title sub-title’></div> <!-- << match -->
而如果没有,&它将匹配具有class sub-title的元素class 的后代title:
<div class=’title’> ... <div class=’sub-title’></div> <!-- << match --> ...</div>解决方法
我是CSS和SCSS的新手。
在以下代码中,
.title { width: 718px; &.sub-title { width: 938px; }}
什么是 &。 手段?和嵌套类一样吗?
标签:
CSS
相关文章:
1. mysql - 数据库设计问题2. python - 多态调用方法时却显示bound method...3. node.js - win10如何安装并使用babel?4. linux - 为什么我在mysql的my.cnf下找不到bind-address?5. mysql sql where id in(25,12,87) 结果集如何用按照 25 12 87排序?6. mysql - 一个sql的问题7. web服务器 - ubuntu下布置apache加wsgi加python8. mysql - 数据库字段命名问题,新人,求解9. python - django 项目的 migrations 目录是否应该提交到 git10. mysql索引的疑问
排行榜

网公网安备