这个为什么没效果??

bo523 2011-06-27 02:27:02

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style type="text/css">
.box{ width:200px; height:200px; border:1px dashed #444; margin:0 auto;}
</style>
</head>

<body>
<div class="box" onmouseover="this.style.border='1px solid #444;'" onmouseout="this.style.border='1px dashed #444;'"></div>

</body>
</html>


鼠标移上去边框没变???
...全文
96 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
debugbird 2011-06-27
  • 打赏
  • 举报
回复
顶!!!!!
zell419 2011-06-27
  • 打赏
  • 举报
回复

<div class="box" onmouseover="this.style.border='1px solid #444';" onmouseout="this.style.border='1px dashed #444';"></div>
kk297173176 2011-06-27
  • 打赏
  • 举报
回复
onmouseover="this.style.border='1px solid #444';" onmouseout="this.style.border='1px dashed #444';"


分号应该放'"
挨踢直男 2011-06-27
  • 打赏
  • 举报
回复
去掉后面的 ";"号
挨踢直男 2011-06-27
  • 打赏
  • 举报
回复
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style type="text/css">
.box{ width:200px; height:200px; border:1px dashed #444; margin:0 auto;}
</style>
</head>

<body>
<div class="box" onmouseover="this.style.border='1px solid #444'" onmouseout="this.style.border='1px dashed #444'"></div>

</body>
</html>

87,990

社区成员

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

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