例如,我有一些元素在不同的上下文中具有不同的规则,但有些规则是相同的。
可以为他们定义一个类并在不同的上下文中扩展它吗?
.read-more {
display: inline-block;
text-align: center;
padding: 0 15px;
text-decoration: none;
color: blue;
margin-left: 5px;
}
#one .read-more {
background: yellow;
}
#two .read-more {
background: #ff9e13;
}