我在样式表中有以下内容:
.tab {
background-color: #1A1A1A;
color: #A17749;
font-family: Verdana,"Helvetica Neue",Helvetica,Arial,sans-serif;
-webkit-border-bottom-right-radius: 10px;
-webkit-border-bottom-left-radius: 10px;
-moz-border-radius-bottomright: 10px;
-moz-border-radius-bottomleft: 10px;
border-bottom-right-radius: 10px;
border-bottom-left-radius: 10px;
float: right;
padding: 7px;
margin: 0 0 0 10px;
}
.tab .select {
height: 55px;
}
然后我有一个 html 文件:
<div id="content">
<div class="tab select"><a href="#">Pricing</a></div>
...
但不知何故 css class select 没有被应用。有什么想法吗?
最佳答案
.tab .select {
需要是 .tab.select {
.tab .select { //<- applies to tag with .select class which is child of tag with .tab class
.tab.select { //<- applies to tag with classes .tab and .select
关于html - 将另一个 css 类应用于元素,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9958553/