背景圖片在IE中無效,360下顯示正常
<!DOCTYPE HTML>?
<html>
<head>
<meta charset="UTF-8">
<title>a標(biāo)簽做按鈕</title>
<style type="text/css">
a{
display:inline-block;
height:40px;
line-height:40px;
padding-left:15px;
background:url(1.jpg);?
font-size:14px;
}
a:hover{
background-position:0 -80px;
}
a span{
display:inline-block;
background:url(1.jpg) right -40px;
padding-right:15px;
height:40px;
line-height:40px;
}
a:hover span{
background-position:right -120px;
}
</style>
</head>
<body>
? <div class="button">
<a><span>按鈕</span></a>
? </div>
</body>
</html>
2015-01-17
background-image:url(../images/bg.jpg);background-repeat:no-repeat'background-position:0px 0px簡(jiǎn)寫為background:url(../images/bg.jpg) no-repeat 0px 0px;因?yàn)槔系臑g覽器對(duì)于簡(jiǎn)寫這種兼容性好一點(diǎn)