谷歌与火狐的CSS:hover差异

来源:互联网 发布:阿里云手机端 编辑:程序博客网 时间:2024/05/18 01:24
<http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><style type="text/css">#f {width: 200px;height: 200px;background-color: red;position: absolute;z-index: 0;}#f:hover {z-index: -2;}#s {width: 200px;height: 200px;background-color: black;position: absolute;z-index: -1;}#s:hover {z-index: 1;}</style></head><body><div id="f">1</div><div id="s">2</div></body></html>


一个闪,一个不闪。“hover”是理解为“悬浮”呢,还是理解为“悬停”?