首页 > Web开发 > 详细

CSS实现超级链接需要通过双击后跳转

时间:2015-12-31 08:45:09      阅读:104      评论:0      收藏:0      [点我收藏+]
CSS代码

复制代码
代码如下:

.test3 span {
position: relative;
}
.test3 span a {
position: relative;
z-index: 2;
}
.test3 span a:hover, .test3 span a:active {
z-index: 4;
}
.test3 span input {
background: transparent;
border: 0;
cursor: pointer;
position: absolute;
top: -1px;
left: 0;
width: 101%; /* Hacky */
height: 301%; /* Hacky */
z-index: 3;
}
.test3 span input:focus {
background: transparent;
border: 0;
z-index: 1;
}

html代码

复制代码
代码如下:

<div class="test3">
<span><input type="text" value="&nbsp;" readonly="true" />
<a href="http://www.baidu.com">Double click me</a></span>
</div>

CSS实现超级链接需要通过双击后跳转

原文:http://www.jb51.net/css/109931.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!