一个DIV层 鼠标移动上面变成手的样式怎么弄啊。

hewen19891216 2009-10-07 03:41:57
一个DIV层 鼠标移动上面变成手的样式怎么弄啊。
...全文
2572 18 打赏 收藏 转发到动态 举报
写回复
用AI写文章
18 条回复
切换为时间正序
请发表友善的回复…
发表回复
programmer2010 2010-01-12
  • 打赏
  • 举报
回复
<div style="cursor:hand"></div>
hoojo 2010-01-12
  • 打赏
  • 举报
回复

<div style="cursor:pointer"></div>

就这样很简单吧。
xinyiben 2010-01-12
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 zhoupuyue 的回复:]
设置div的style属性,cursor:pointer;
[/Quote]

right
changshi716 2010-01-12
  • 打赏
  • 举报
回复
style="cursor:pointer;"
linyu1247 2010-01-12
  • 打赏
  • 举报
回复
最好用cursor:pointer,cursor:hand firefox不支持。
zxhbjz5 2010-01-12
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 zhoupuyue 的回复:]
设置div的style属性,cursor:pointer;
[/Quote]

这个是对的
bbb332 2009-10-12
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 zhoupuyue 的回复:]
设置div的style属性,cursor:pointer;
[/Quote]
up
Owenini 2009-10-12
  • 打赏
  • 举报
回复
cursor:hand or pointer;
hnfenfen 2009-10-10
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 zhoupuyue 的回复:]
设置div的style属性,cursor:pointer;
[/Quote]
ding
zl3450341 2009-10-10
  • 打赏
  • 举报
回复
[Quote=引用 6 楼 liangyaotian1 的回复:]
引用 4 楼 zl3450341 的回复:
Java code <style>
#idTable{width:100%;border:0px;background-color:#000000;}
#idTable td{background-color:honeydew;}
#idDIV{width:80%;height:40px;background-

color:#FF6633;color:#FFFFFF;padding:4px;} </style> <script>
function rdl_change(e){
event.cancelBubble=true;if (event.srcElement.tagName.toLowerCase()!="td")return;
with (event.srcElement)try

{style.cursor=innerText;style.backgroundColor="lightyellow";onmouseout=new Function("this.style.backgroundColor='honeydew'");}catch(e){}
} </script> <table border=0 id=idTable cellpadding=3 cellspacing=1

onmouseover="rdl_change()"> <tr> <td>auto </td> <td>all-scroll </td> <td>col-resize </td> <td>crosshair </td> </tr> <tr> <td>move </td> <td>help </td> <td>no-drop </td> <td>not-allowed </td> </tr> <tr> <td>row-resize </td> <td>text </td> <td>vertical-text </td> <td>wait </td> </tr> <tr> <td>hand </td> <td>progress </td> <td>s-resize </td> <td>se-resize </td> </tr> <tr> <td>default </td> <td>pointer </td> <td>w-resize </td> <td>nw-resize </td> </tr> <tr> <td>n-resize </td> <td>e-resize </td> <td>ne-resize </td> <td>sw-resize </td> </tr> <tr> <td colspan=2>url(images/rdl_tnt.ani) </td> <td colspan=2>url

(images/rdl_cross.cur) </td> </tr> </table> <br> <div id=idCodeDiv>请将鼠标移动到上方的表格中察看光标样式。 </div>

直接复制粘贴到记事本 另存为html看看

curs的各种属性示例

为什么你这个例子在火狐中国版没有这个效果的??
[/Quote]

在IE上看
swandragon 2009-10-10
  • 打赏
  • 举报
回复
设置div的style属性,cursor:hand
shuangfang 2009-10-10
  • 打赏
  • 举报
回复
设置div的style属性,cursor:pointer;
right
liangyaotian1 2009-10-07
  • 打赏
  • 举报
回复
[Quote=引用 4 楼 zl3450341 的回复:]
Java code<style>
#idTable{width:100%;border:0px;background-color:#000000;}
#idTable td{background-color:honeydew;}
#idDIV{width:80%;height:40px;background-

color:#FF6633;color:#FFFFFF;padding:4px;}</style><script>
function rdl_change(e){
event.cancelBubble=true;if (event.srcElement.tagName.toLowerCase()!="td")return;
with (event.srcElement)try

{style.cursor=innerText;style.backgroundColor="lightyellow";onmouseout=new Function("this.style.backgroundColor='honeydew'");}catch(e){}
}</script><table border=0 id=idTable cellpadding=3 cellspacing=1

onmouseover="rdl_change()"><tr><td>auto</td><td>all-scroll</td><td>col-resize</td><td>crosshair</td></tr><tr><td>move</td><td>help</td><td>no-drop</td><td>not-allowed</td></tr><tr><td>row-resize</td><td>text</td><td>vertical-text</td><td>wait</td></tr><tr><td>hand</td><td>progress</td><td>s-resize</td><td>se-resize</td></tr><tr><td>default</td><td>pointer</td><td>w-resize</td><td>nw-resize</td></tr><tr><td>n-resize</td><td>e-resize</td><td>ne-resize</td><td>sw-resize</td></tr><tr><td colspan=2>url(images/rdl_tnt.ani)</td><td colspan=2>url

(images/rdl_cross.cur)</td></tr></table><br><div id=idCodeDiv>请将鼠标移动到上方的表格中察看光标样式。</div>

直接复制粘贴到记事本 另存为html看看

curs的各种属性示例
[/Quote]
为什么你这个例子在火狐中国版没有这个效果的??
duduandice 2009-10-07
  • 打赏
  • 举报
回复
设置div的style属性
zl3450341 2009-10-07
  • 打赏
  • 举报
回复

<style>
#idTable{width:100%;border:0px;background-color:#000000;}
#idTable td{background-color:honeydew;}
#idDIV{width:80%;height:40px;background-

color:#FF6633;color:#FFFFFF;padding:4px;}
</style>

<script>
function rdl_change(e){
event.cancelBubble=true;
if (event.srcElement.tagName.toLowerCase()!="td") return;
with (event.srcElement) try

{style.cursor=innerText;style.backgroundColor="lightyellow";onmouseout=

new Function("this.style.backgroundColor='honeydew'");} catch(e){}
}
</script>

<table border=0 id=idTable cellpadding=3 cellspacing=1

onmouseover="rdl_change()"><tr>
<td>auto</td><td>all-scroll</td><td>col-resize</td><td>crosshair</td>
</tr><tr>
<td>move</td><td>help</td><td>no-drop</td><td>not-allowed</td>
</tr><tr>
<td>row-resize</td><td>text</td><td>vertical-text</td><td>wait</td>
</tr><tr>
<td>hand</td><td>progress</td><td>s-resize</td><td>se-resize</td>
</tr><tr>
<td>default</td><td>pointer</td><td>w-resize</td><td>nw-resize</td>
</tr><tr>
<td>n-resize</td><td>e-resize</td><td>ne-resize</td><td>sw-resize</td>
</tr><tr>
<td colspan=2>url(images/rdl_tnt.ani)</td><td colspan=2>url

(images/rdl_cross.cur)</td>
</tr></table>
<br>
<div id=idCodeDiv>请将鼠标移动到上方的表格中察看光标样式。</div>


直接复制粘贴到记事本 另存为html看看

curs的各种属性示例
young_smile 2009-10-07
  • 打赏
  • 举报
回复
[Quote=引用楼主 hewen19891216 的回复:]
一个DIV层 鼠标移动上面变成手的样式怎么弄啊。
[/Quote]

right!
licip 2009-10-07
  • 打赏
  • 举报
回复
楼上的正确!!!
阿_布 2009-10-07
  • 打赏
  • 举报
回复
设置div的style属性,cursor:pointer;

81,092

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧