CSS实现超级链接需要通过双击后跳转
CSS实现超级链接需要通过双击后跳转
发布时间:2016-12-27 来源:查字典编辑
摘要:CSS代码.test3span{position:relative;}.test3spana{position:relative;z-ind...

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>

<span><input type="text" value="&nbsp;" readonly="true" />

<a href="http://www.baidu.com">Double click me</a></span>

</div>

推荐文章
猜你喜欢
附近的人在看
推荐阅读
拓展阅读
相关阅读
网友关注
最新 Div+Css教程学习
热门 Div+Css教程学习
网页设计子分类