我想鏈接我的背景圖片使用教程在http://xavisys.com/css-trick-turning-a-background-image-into-a-clickable-link/#comment-28009但它只是不適合我。鏈接背景圖片
我認爲我有正確的CSS,但是當我插入html來建立鏈接時,它將我的整個網站設置爲一個巨型鏈接。有沒有辦法讓我的內容後面的鏈接層,所以它只能在容器的兩側點擊?
body {
background-image: url('images/bg.png');
background-position: center top;
background-attachment: fixed;
}
body #background-link {
position: absolute;
height:11000px;
text-indent:-9999px;
width:1440px;
top: 0; left: 0;
border: 0;
float: left;
}
和這個網站:
<a href="http://url.com" title="Title" id="background-link">the link</a>
僅供參考 - 這不是爲了使整個網站的背景成爲一個鏈接,而是用於網站內的單個圖像背景。它應該工作,如果你使用下面的代碼,但。 – 2011-04-17 15:23:01