亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

錨鏈接內的按鈕在Firefox中有效,但在Internet Explorer中不起作用?

錨鏈接內的按鈕在Firefox中有效,但在Internet Explorer中不起作用?

紅顏莎娜 2019-11-18 10:49:57
我的網站上的其他所有內容似乎都與所有瀏覽器兼容,但鏈接除外。它們出現在頁面上,但不起作用。我的鏈接代碼如下-<td bgcolor="#ffffff" height="370" valign="top" width="165">    <p>        <a href="sc3.html">            <button style="width:120;height:25">Super Chem #3</button>        </a>         <a href="91hollywood.html">            <button style="width:120;height:25">91 Hollywood</button>        </a>         <a href="sbubba.html">            <button style="width:120;height:25">Super Bubba</button>        </a>         <a href="afgoohash.html">            <button style="width:120;height:25">Afgoo Hash</button>        </a>         <a href="superjack.html">            <button style="width:120;height:25">Super Jack</button>        </a>         <a href="sog.html">            <button style="width:120;height:25">Sugar OG</button>        </a>         <a href="91pk91.html">            <button style="width:120;height:25">91 x PK</button>        </a>         <a href="jedi1.html">            <button style="width:120;height:25">Jedi</button>        </a>    </p>    <p>&nbsp;</p>    <a href="http://indynile99.blogspot.com">        <button style="width:120;height:25">Blog</button>    </a>    <p>&nbsp;</p></td>
查看完整描述

3 回答

?
料青山看我應如是

TA貢獻1772條經驗 獲得超8個贊

只需注意:

W3C鏈接標簽內的按鈕沒有問題,因此它只是另一個MS次標準。


回答:

除非您要獲得完整圖像,否則請使用代理按鈕。


可以將“代理”按鈕放入標記中(如果使用跨度,則更安全,而不是div)。


可以將其設置為看起來像按鈕或其他任何樣式。


它具有多種功能-一段CSS代碼可為所有實例提供支持-只需定義一次CSS,然后從該位置開始,只需在代碼需要的地方復制并粘貼html實例即可。


每個按鈕都可以有自己的標簽-非常適合使用多種語言的頁面(我想很容易為每種語言做圖片)-還可以使整個腳本更容易地傳播實例。


調整其寬度以適應標簽長度-如果需要,也可以采用固定寬度。

IE7是上述情況的一個例外-它必須具有寬度,否則將使該按鈕從一端到另一端-為其提供寬度,也可以向左浮動按鈕

-IE7的CSS:

一種。.width:150px; (在屬性之前記下點,我通常以添加此類點為目標IE7-刪除點,所有瀏覽器都會讀取該屬性)

b。text-align:center; -如果寬度固定,則必須將其居中放置文本/標簽

c。cursor:pointer; -所有IE必須有這個正確顯示鏈接指針-好的瀏覽器不需要它


可以向前走一步,此代碼和使用CSS3樣式它,而不是使用圖像:

一。圓角的半徑(限制:IE將顯示它們為正方形)

b。漸變以使其像“按鈕一樣”(限制:Opera不支持漸變,因此請記住為此瀏覽器設置標準背景色)

C。使用:hover pclass可以根據鼠標指針的位置等更改按鈕狀態。-您可以將其僅應用于文本標簽或整個按鈕


下面的CSS代碼:

.button_surrogate span { margin:0; display:block; height:25px; text-align:center; cursor:pointer; .width:150px; background:url(left_button_edge.png) left top no-repeat; }


.button_surrogate span span { display:block; padding:0 14px; height:25px; background:url(right_button_edge.png) right top no-repeat; }


.button_surrogate span span span { display:block; overflow:hidden; padding:5px 0 0 0; background:url(button_connector.png) left top repeat-x; }

下面的HTML代碼(按鈕實例):


<a href="#">

  <span class="button_surrogate">

     <span><span><span>YOUR_BUTTON_LABEL</span></span></span>

  </span>

</a>


查看完整回答
反對 回復 2019-11-18
  • 3 回答
  • 0 關注
  • 503 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號