0
我設置樣式爲L1標籤和懸停
.centermenu li
{
position: relative;
float: right;
cursor: pointer;
height: 32px;
width: 152px;
margin: 10px 0 0 10px;
color: #fff;
}
.centermenu li:hover, .centermenu li:focus
{
background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(255,255,255,.2)), to(rgba(255,255,255,0)));
background-image: -webkit-linear-gradient(top, rgba(255,255,255,.2), rgba(255,255,255,0));
background-image: -moz-linear-gradient(top, rgba(255,255,255,.2), rgba(255,255,255,0));
background-image: -ms-linear-gradient(top, rgba(255,255,255,.2), rgba(255,255,255,0));
background-image: -o-linear-gradient(top, rgba(255,255,255,.2), rgba(255,255,255,0));
background-image: linear-gradient(top, rgba(255,255,255,.2), rgba(255,255,255,0));
}
它在Firefox和GoogleChrom設置但不要在Internet Explorer中。
我爲IE設置了此代碼,但不設置樣式。
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFF 20%', endColorstr='#ffffff 1%');
/* For Internet Explorer 8 */
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFF 20%', endColorstr='#ffffff 1%')";
internet expolorer不支持此,至少ie8和此 –
過濾器:progid:DXImageTransform.Microsoft.gradient(startColorstr ='#cccccc',endColorstr ='#000000'); – skhurams
我使用IE9和IE10但不工作。 – Niloo