用css 添加手狀樣式,鼠標移上去變小手,變小手
方式一、
cursor:pointer;
方式一、
cursor:pointer;
cursor:hand 與 cursor:pointer 的效果是一樣的,都像光標指向鏈接一樣,光標變成手行。
cursor:hand :IE完全支持。但是在firefox是不支持的,沒有效果。
cursor:pointer :是CSS2.0的標准。所以firefox是支持的,但是IE5.0既之前版本不支持。IE6開始支持。
結論:還是用 cursor:pointer 來的方便
用JS使鼠標變小手onmouseover(鼠標越過的時候)
onmouseover="this.style.cursor='hand'"
方式二、
cursor:hand :IE完全支持。但是在firefox是不支持的,沒有效果。
cursor:pointer :是CSS2.0的標准。所以firefox是支持的,但是IE5.0既之前版本不支持。IE6開始支持。
結論:還是用 cursor:pointer 來的方便
用JS使鼠標變小手onmouseover(鼠標越過的時候)
onmouseover="this.style.cursor='hand'"
方式二、
href="javascript:void(0)" 或者 href="#"
cursor其他取值
auto :標准光標
default :標准箭頭
pointer, hand :手形光標
wait :等待光標
text :I形光標
vertical-text :水平I形光標
no-drop :不可拖動光標
not-allowed :無效光標
help :幫助光標
all-scroll :三角方向標
move :移動標
crosshair :十字標
e-resize
n-resize
nw-resize
w-resize
s-resize
se-resize
sw-resize