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