悬停< a>在没有href的CSS中 [英] Hovering <a> in CSS without href

查看:86
本文介绍了悬停< a>在没有href的CSS中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要一张照片才能在其上方移动。我通过改变悬停在其上的z-index来获得在CSS中的工作。但是,我不希望任何人点击它。因此,我已经从标签中删除了href。我听说这是IE6的一个问题,但是我已经读过,甚至包括XHTML的规范,这就是我的代码验证的内容。那么,是否存在针对缺少href的IE6的解决方法?有没有人在这里有IE6可以测试这个,看看它是否真的有问题?

解决方案

也许你应该

  href =#

并将光标从手形改为普通的指针;)


I need a picture to change upon hovering over it. I got that working in CSS by changing the z-index upon hovering over it. However, I don't want anyone to click on it. Thus, I have removed the href from the tag. I have heard that this is a problem for IE6, however I have read that such is within the specifications of even XHTML, which is what my code validates in. So, is there a work-around for IE6 for the lack of an href? Does anyone on here have IE6 that can test this and see if it's really a problem?

解决方案

Maybe u should

href="#"

and change cursor from "hand" to normal "pointer" ;)

这篇关于悬停< a>在没有href的CSS中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆