[英]how do I manage css pseudo-selectors in sass?
I'd like to apply a style to a hyperlink on hover. 我想将样式应用于悬停时的超链接。
I'm trying this: 我正在尝试:
#myID a
text-decoration: none
color: #fff
&:hover
color: #0077a9
However, the last rule isn't being applied. 但是,未应用最后一条规则。
Your code is fine, here's a working demo: http://sassbin.com/gist/6129692/ 您的代码很好,这是一个有效的演示: http : //sassbin.com/gist/6129692/
There might be an issue with indentation though. 缩进可能有问题。 Your example has three spaces of first-level indentation, while two spaces are correct. 您的示例有三个空格的一级缩进,而两个空格是正确的。
If this does not solve your issue, please provide more information: error text, resulting CSS file, maybe an example shared via http://sassbin.com 如果这不能解决您的问题,请提供更多信息:错误文本,生成的CSS文件,也许是通过http://sassbin.com共享的示例
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.