2012-10-04 139 views
0

如何使我的透明gif圖像成爲一個鏈接,如果按下透明部分,鏈接將不會響應?透明背景圖片鏈接

<a href="{storeurl}?act=viewDoc&docId=1"><img src="skins/sunlift/styleImages/navbar_pic/leafshape.gif></a> 

任何想法?

+0

所以,以確保我有這個權利。你想讓你的錨點成爲透明背景的圖像,但你不希望背景可點擊? – Daedalus

回答

2
<img src="skins/sunlift/styleImages/navbar_pic/leafshape.gif> 
      here is the problem ----------------------------^-- there should be " 

應該

<img src="skins/sunlift/styleImages/navbar_pic/leafshape.gif"> 
+0

我明白了。我將它改爲 但它仍然不起作用。 – eric

1

.................................. ..........................

喜現在給你鏈接display屬性,這樣

a{ 
display:inline-block; 
vertical-align:top; 
} 

因爲ainline block元素

+0

@Daedalus現在檢查是內嵌塊還是內嵌塊http://www.tutorialchip.com/tutorials/inline-elements-list-whats-new-in-html5/檢查此鏈接 –

+0

絕不要使用第三方引用網站作爲引用。如果您要引用某些內容,應該是[w3c規範](http://www.w3.org/TR/1999/REC-html401-19991224/struct/links.html#edef-A)。另外,你剛纔所說的沒有意義,因爲我從來沒有對短劃線的存在提出異議,而是你不需要指定默認值。 – Daedalus

+0

@Daedalus現在檢查現場演示我創建你檢查並接受這是內聯元素http://jsfiddle.net/jGUtH/ –