欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

css 兼容性問題this.style.cursor=''hand''

 更新時間:2008年11月05日 23:05:44   作者:  
css 兼容性問題this.style.cursor='hand'讓我們來CSS HACK
作者:洛科
先看這一句
復(fù)制代碼 代碼如下:

<a href='#' onmouseover="this.style.cursor='hand'" onmouseout="this.style.cursor='default'" onclick="document.getElementById('ShowContent').innerHTML='';return false;">
<img alt="清空屏幕" src="UI/clear.gif" style="border:0"/>
</a>

在IE下是沒問題的,當(dāng)鼠標(biāo)劃過去時,會出現(xiàn)一個小手的形狀,但是在FF中,只有第一次劃過去才有效,這個有效是因為有錨記A的存在,而不是onmouseover起作用的結(jié)果。
網(wǎng)上找了很多,都說只要讓this.style.cursor='hand'改成this.style.cursor='pointer'就可以了,但是在FF中鼠標(biāo)劃過去時只有第一次會出現(xiàn)小手。
其實在FF下面要達(dá)到在IE中一樣的效果也是可以的。我們的辦法就是使用CSS HACK(難道我為CSS HACK又增添了這一條 哈哈?)
復(fù)制代碼 代碼如下:

<a href='#' onmouseover="this.style.cursor='pointer';this.style.cursor='hand'" onmouseout="this.style.cursor='default'" onclick="document.getElementById('ShowContent').innerHTML='';return false;">
<img alt="清空屏幕" src="UI/clear.gif" style="border:0"/>
</a>

在IE7和FF3.0.3中測試通過。

相關(guān)文章

最新評論