你的位置:首页 > 网页设计

[网页设计]纯CSS实现双击链接跳转功能


<!DOCTYPE html >
<html>
<head>
<title>双击打开链接</title>
<meta http-equiv="Content-Type" content="text/html; charset=gbk" />
<style type="text/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%;
height: 301%;
z-index: 3;
}
.test3 span input:focus {
background: transparent;
border: 0;
z-index: 1;
}
</style>
</head>
<body>
<div>http://www.999jiujiu.com/</div>
<div >
<span><input type="text" value="&nbsp;" readonly="true" />
<a href="http://www.baidu.com">双击我</a></span>
</div>
</body>
<html>