Re: [問題] 連結想要這樣作...

看板Web_Design作者 (大魔王)時間18年前 (2007/12/24 16:03), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串3/3 (看更多)
※ 引述《mdfh (您真內行)》之銘言: : 想要這樣作: : 平常是一個普通的圖片超連結 : 可是滑鼠移上去之後會出現白色邊框(但是不會因為邊框造成圖片移動) : 滑鼠移開邊框又不見 : CSS部份 : ----------------------------- : a.menu1:link { border: 0;} : a.menu1:visited { border: 0;} : a.menu1:hover { border: 2px white; padding: -2px;} : a.menu1:active { border: 2px white; padding: -2px;} : -------------------------------- : HTML部份 : <a href="1234.html" class="menu1"><img src="1234.gif" alt="1234" /></a> : 想當然爾失敗了 orz : 圖片有固定的外邊框,但是沒有任何變化 : 請問是哪裡沒有仔細考量嗎? 試試看這個 <table border="0" cellspacing="0" > <tr> <td width="100%" onmouseover="this.style.backgroundColor='#FF0000';" onmouseout="this.style.backgroundColor='#999999';" colspan="2" rowspan="2" > <a href="1234.html" class="menu1"> <img src="http://w6.pchome.com.tw/adpics/pic_113482_68268.gif" alt="1234" border=0 width="96" height="96" ></a></td> </tr> </table> 這是變換表格達到相同效果,而且排版上會更方便 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 220.130.152.1
文章代碼(AID): #17RsVhxl (Web_Design)
文章代碼(AID): #17RsVhxl (Web_Design)