這個CSS問題是殺死我:-(css - 填充文本鏈接旁邊的背景圖像鏈接 - 爲什麼?
我無法刪除此頁面http://www.yart.com.au/stackoverflow/test2.htm
我的問題減少到最低限度,所以它是很清楚的鏈接下填充。
可以見我的問題在這裏http://www.yart.com.au/stackoverflow/blue.pngalt text http://www.yart.com.au/stackoverflow/blue.png
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<style type="text/css">
*
{
padding:0;
margin:0;
font:15px arial;
}
div
{
display:inline;
height:18px;
line-height:18px;
background-color :blue;
}
.PageMove
{
display:inline-block;
background-image: url(http://www.yart.com.au/stackoverflow/page_move.gif);
background-repeat:no-repeat;
width:18px;
height:18px;
line-height:18px;
}
.Text
{
background-color :red;
display:inline;
height:18px;
line-height:18px;
}
</style>
</head>
<body>
<div><a href="#" class="PageMove"></a><a href="#" class="Text">18 pixels high</a></div>
</body>
</html>
...因爲浮甚至比inline-block的 – Quentin 2010-07-12 12:30:34