首页 > HTML5/CSS3

各种CSS3网页按钮Button样式

发表于2014-07-30 21:01:14| --次阅读| 来源webkfa| 作者小猪仔

摘要:本页面向大家展开了各种漂亮的网页Button按钮样式,各式各样的都有,适合不同的场合使用。CSS3技术的确非常强大,不过大家测试的时候不要使用IE8,因为IE8还没有完全支持css3,微软如此不屑CSS3,唉!请使用火狐或Safari或Google Chrome。
css3代码
运行代码
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
 <HEAD>
  <TITLE>web开发-webkfa.com</TITLE>
  <META NAME="Generator" CONTENT="EditPlus">
  <META NAME="Author" CONTENT="">
  <META NAME="Keywords" CONTENT="">
  <META NAME="Description" CONTENT="">
  <style>
	.button{
	  display: inline-block;
	  *display: inline;
	  zoom: 1;
	  padding: 6px 20px;
	  margin: 0;
	  cursor: pointer;
	  border: 1px solid #bbb;
	  overflow: visible;
	  font: bold 13px arial, helvetica, sans-serif;
	  text-decoration: none;
	  white-space: nowrap;
	  color: #555;
	  background-color: #ddd;
	  background-image: linear-gradient(top, rgba(255,255,255,1),
											 rgba(255,255,255,0)),
						url(data:image/png;base64,iVBORw0KGg[...]QmCC); 
	  transition: background-color .2s ease-out;
	  background-clip: padding-box; /* Fix bleeding */
	  border-radius: 3px;
	  box-shadow: 0 1px 0 rgba(0, 0, 0, .3),
				  0 2px 2px -1px rgba(0, 0, 0, .5),
				  0 1px 0 rgba(255, 255, 255, .3) inset;
	  text-shadow: 0 1px 0 rgba(255,255,255, .9);  
	}
	.button:hover{
	  background-color: #eee;
	  color: #555;
	}
	.button:active{
	  background: #e9e9e9;
	  position: relative;
	  top: 1px;
	  text-shadow: none;
	  box-shadow: 0 1px 1px rgba(0, 0, 0, .3) inset;
	}

	/* 小号样式 */
	.button.small{
	  padding: 4px 12px;
	}
	/* 大号样式 */
	.button.large{
	  padding: 12px 30px;
	  text-transform: uppercase;
	}
	.button.large:active{
	  top: 2px;
	}

	.button.color{
	  color: #fff;
	  text-shadow: 0 1px 0 rgba(0,0,0,.2);
	  background-image: linear-gradient(top, rgba(255,255,255,.3), 
						 rgba(255,255,255,0)),
						url(data:image/png;base64,iVBORw0KGg[...]QmCC);
	}
	/* */
	.button.green{
	  background-color: #57a957;
	  border-color: #57a957;
	}
	.button.green:hover{
	  background-color: #62c462;
	}
	.button.green:active{
	  background: #57a957;
	}
	/* */
	.button.red{
	  background-color: #c43c35;
	  border-color: #c43c35;
	}
	.button.red:hover{
	  background-color: #ee5f5b;
	}
	.button.red:active{
	  background: #c43c35;
	}
	/* */
	.button.blue{
	  background-color: #269CE9;
	  border-color: #269CE9;
	}
	.button.blue:hover{
	  background-color: #70B9E8;
	}
	.button.blue:active{
	  background: #269CE9;
	}
  </style>
 </HEAD>

 <BODY>
	<a href="http://www.webkfa.com/one4/w55.html" target="_blank" class="button" >Button</a>
	<a href="http://www.webkfa.com/one4/w55.html" target="_blank" class="small button" >Button</a>
	<a href="http://www.webkfa.com/one4/w55.html" target="_blank" class="large button" >Button</a><br/><br/><br/>

    <a href="http://www.webkfa.com/one4/w55.html" target="_blank" class="button" >Button</a>
	<a href="http://www.webkfa.com/one4/w55.html" target="_blank" class="color red button" >Button</a>
	<a href="http://www.webkfa.com/one4/w55.html" target="_blank" class="color green button" >Button</a>
	<a href="http://www.webkfa.com/one4/w55.html" target="_blank" class="color blue button" >Button</a>
 </BODY>
</HTML>

相关文章

猜你喜欢

学到老在线代码浏览器 关闭浏览
友情链接: hao123 360导航 搜狗网址导航 114啦网址导航 博客大全
Copyright © 1999-2014, WEBKFA.COM, All Rights Reserved  京ICP备14034497号-1