曾经我也努力学习过一段时间的css,奈何太笨,始终学不好,需要用的时候就去别人网站上去扒,嘿嘿。
按钮在HTML页面中很常见,为了好看的按钮我几乎把百度的服务器给整崩溃了。
本站效果(扒的别人的,嘿嘿):
为什么说是假按钮呢?因为它不是按钮标签写出来的,实现代码:
复制
<html>
<head>
<meta charset="utf-8">
<title>代码狗按钮css样式</title>
//css是我在百度找的,再修改修改将就用吧
<style>
.dow{display:block;width:202px;height:52px; line-height:52px; text-align:center; font-family:arial,verdana,sans-serif, '新宋体'; font-weight:bold; font-size:22px; background:#45B6F7;color:#fff; text-decoration:none; cursor:pointer}
.dow:hover{background:#F88E8B;}
.dow:active{background:#F88E8B;}
</style>
</head>
<body>
<input name="xiazai" type="submit" class="dow" value="立即下载">
<br />
<button name="xiazai" type="submit" class="dow">立即下载</button>
<br />
<br />
<a href="#" class="dow">立即下载</a>
</body>
</html>效果如图:






评论 (0)