inut按钮hover时转变的css操纵编码

2021-03-10 08:17 jianzhan


拷贝编码
编码以下:

<!DOCTYPE html>
<html>
<head>
<style>
a.a2{line-height:100px;text-align:center;text-decoration:none;background-color:#54ABE1; color:#fff;border:1px solid darkgray;display:block;width:100px;height:100px;backgroud-color:red;position:relative;overflow:hidden;}
a.a2 input{cursor:pointer;position:absolute;top:⑴0px;left:⑴0px;width:200px;height:200px;background:url(http://icon.chinahrd.net/images/none.gif) transparent; border:0; }
a.a2:hover{ background-color:#59595A;}
</style>
</head>
<body>
<form action="http://www.baidu.com/sss.html" method="GET" target="_blank">
<a class="a2" href="javascript:;">垂直居中显示信息
<input type="submit" value="" />
</a>
</form>
</body>
</html>

hover时黑色,

应用a+input完成,能够便捷css操纵,

不必须js.

ie6⑴0/op/ff/ch都沒有难题.