纯CSS制作的IE6兼容型table hover
来源:互联网 发布:长篇网络禁书百度云 编辑:程序博客网 时间:2024/04/30 12:02
昨天在跟龙哥做项目的时候看到了原来代码里的那个效果——
鼠标放到行上,行高亮、鼠标变pointer、字体颜色变色。
本来打算用hover直接给做了的,后来发现IE6只支持a标签的hover事件,于是决定用JS。然后首先写的是onMouseOver="this.backgroundColor='blue'",后来发现没法写"cursor='poiter'",于是打算用封装好的类名,遂修改为"this.className='MouseOn'",然后增加了onMouseOut="this.className='MouseOut'"
后来发现a标签内的文字无法用MouseOver来定义,然后……在Web设计交流群里千夜小朋友的支持下把效果做了,代码如下:
<!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 content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>Test_AHover</title>
<style type="text/css">
.MouseOn {
background:aqua;cursor:pointer
}
.MouseOn a{
display:block;color:red
}
.MouseOut {
background:white;cursor:default
}
.MouseOut td a :link{
color:black
}
table{
width:100%;background-color:white;
}
table a{
text-decoration:none;color:black
}
td {
width:100%
}
</style>
</head>
<body>
<table>
<tr onmouseover="this.className='MouseOn'" onmouseout="this.className='MouseOut'">
<td><a href="http://www.baidu.com">sadffffffffffffffffff</a></td>
</tr>
</table>
</body>
</html>
- 纯CSS制作的IE6兼容型table hover
- 兼容ie8的纯css图标制作
- 纯CSS的下拉菜单[兼容 IE6,IE7,FF]
- 纯CSS弹出式菜单(兼容IE6)
- 纯CSS制作支持IE6、IE7、Firefox的下拉菜单
- IE6 下:hover 中bug解决了(纯CSS)
- CSS制作三角箭头(兼容IE6)
- 【CSS】黑色幽默,兼容IE6的纯原生态的门户网站
- 纯css画三角形/梯形(兼容ie6)
- 用纯CSS制作的下拉菜单,并且支持IE6 IE7 Firefox
- IE6中a:hover的CSS伪类无效
- 解决ie6 css:hover 背景色不改变的方案
- 使用css制作三角,兼容IE6,用到的标签<div><s><span>
- 纯css hover放大图片
- 【JavaScript】利用onmousemove与onmouseout事件制作兼容IE6纯javascript无插件原生态的下拉菜单dropdown
- 纯CSS的下拉菜单 支持IE6
- CSS兼容IE6,IE7,FireFox兼容CSS的解决方法
- 纯CSS制作的渐变层(兼容IE/Firefox/Opera)
- tomcat6.0The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.
- ORA-28000报错解决
- YUV格式的解析zz
- hdu1170--Balloon Comes!
- oracle10G 的ORA-12505问题解决方法
- 纯CSS制作的IE6兼容型table hover
- MySQL 当记录不存在时插入(insert if not exists)
- 北大ACM题目分类3
- 话说高清电视
- java远程调用之spring和hessian
- 从osCommerce到Zen Cart,再到CubeCart
- hibernate二级缓存使用
- 开始研究Twitter。。。
- linux 2.6新增变化