cursor:pointer;
pointer-events: none;
第一行是使鼠标变成箭头而不再是小手形状
第二行是使超链接失效代码
不仅是a标签,iframe标签也有效,示例如下:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
<a class="weather" href="http://www.baidu.com" >测试</a>
<iframe class="weather" allowtransparency="true" frameborder="0" width="385" height="96" scrolling="no" src="//tianqi.2345.com/plugin/widget/index.htm?s=2&z=2&t=0&v=0&d=3&bd=0&k=&f=<f=009944&htf=cc0000&q=1&e=0&a=0&c=60813&w=385&h=96&align=center"></iframe>
</body>
<style type="text/css">
.weather{
color:gray;
cursor:pointer;
pointer-events: none;
}
</style>
</html>
原来的显示效果:鼠标悬停后是小手形状,样式改变,点击后跳转到超链接
更改后显示效果:鼠标悬停是箭头形状,点击无反应
放一个在线运行这个代码的地址