我试图弄清楚为什么这些选项卡除了我正在使用的最新版本的 Chrome (21) 之外没有显示。
我认为这可能与after
标签有关,但这应该适用于大多数主要浏览器(IE8+),根据:quirksmode
CSS:
ul {
list-type: none;
}
li {
cursor: pointer;
display: inline-block;
max-height: 46px;
padding: 14px 10px 0 14px;
-moz-border-radius-topleft: 5px;
-webkit-border-top-left-radius: 5px;
border-top-left-radius: 5px;
}
li.dark_green {
background: url(http://i.imgur.com/49NPN.png) repeat-x;
position: relative;
color: #fff;
}
li.dark_green:after {
background: url(http://i.imgur.com/ggxKy.png) repeat-x;
content: " ";
display: inline-block;
width: 66px;
position: relative;
height: 46px;
display: block;
z-index: 400;
left:50px;
bottom:32px;
}
li.light_green {
background: url(http://i.imgur.com/CRuk8.png) repeat-x;
position: relative;
}
li.light_green::after {
background: url(http://i.imgur.com/K7DAL.png) no-repeat;
content: " ";
display: inline-block;
width: 66px;
position: relative;
height: 46px;
display: block;
z-index: 400;
left:50px;
bottom:32px;
}
.text {
position: relative;
left: 10px;
z-index: 500;
}
.light_green_text {
position: relative;
left: 20px;
z-index: 500;
}
HTML:
<ul>
<li class="light_green"><span class="text">Symptoms</span></li>
<li class="dark_green active"><span class="light_green_text">Problems</span></li>
<li class="light_green"><span class="light_green_text">Behavior</span></li>
</ul>
演示: