【发布时间】:2014-03-20 21:11:09
【问题描述】:
我有以下 CSS 代码将背景设置为具有不透明度的颜色:
#second-menu-navi a {
float:left;
width:125px;
height:40px;
line-height: 40px;
vertical-align: middle;
font-size:11px;
color:#ffffff;
text-decoration: none;
background: rgb(1, 55, 97);
background: rgba(1, 55, 97, .85); /*#013761; /*url('theImages/nav_menu_85_b.png') repeat; /*#013761;*/
margin:0 3px 0 0 !important;
/*background-image: none !important;*/
padding:0 !important;
-moz-border-radius-bottomleft: 4px;
-webkit-border-bottom-left-radius: 4px;
-khtml-border-bottom-left-radius: 4px;
border-bottom-left-radius: 4px;
-moz-border-radius-bottomright: 4px;
-webkit-border-bottom-right-radius: 4px;
-khtml-border-bottom-right-radius: 4px;
border-bottom-right-radius: 4px;
outline:none;
filter:filter:progid:DXImageTransform.Microsoft.Alpha(opacity=85);
/* For IE 8*/
-ms-filter: "filter:progid:DXImageTransform.Microsoft.Alpha(opacity=85);";
}
#tab-1:active, #tab-1:hover {
background-color: #155E9B;
}
#tab-2:active, #tab-2:hover {
background-color: #159B77;
}
#tab-3:active, #tab-3:hover {
background-color: #1E9B15;
}
#tab-4:active, #tab-4:hover {
background-color: #356101;
}
#tab-5:active, #tab-5:hover {
background-color: #9B2B15;
}
#tab-6:active, #tab-6:hover {
background-color: #9B1574;
}
#tab-7:active, #tab-7:hover {
background-color: #70159B;
}
#break-line-2 {
width:100%;
height:7px;
border-top:1px solid #02233C;
background-color:#013761;
position: fixed;
top: 62px;
}
HTML:
<div id="second-menu-navi" class="navi">
<a href="" id="tab-1">Why Choose Us</a>
<a href="" id="tab-2">Physicians</a>
<a href="" id="tab-3">Medical Specialties</a>
<a href="" id="tab-4">Locations</a>
<a href="" id="tab-5">Urgent Care</a>
<a href="" id="tab-6">Radiology</a>
<a href="" id="tab-7">Lab</a>
</div>
</div>
它在 FF/Chrome/IE>=10 中运行良好。
如何编辑过滤器代码以确保它在不支持 rgba() 的 IE 中显示相同的内容?
【问题讨论】:
标签: html css internet-explorer internet-explorer-8