CSS3不同背景颜色的圆角按钮

来源:https://www.sucaihuo.com/js/385.html 2015-08-21 00:32浏览(1704) 收藏

今天分享下用CSS3来制作一个圆角阴影、渐变色的漂亮的按钮。
CSS3不同背景颜色的圆角按钮
分类:css3 > 按钮 难易:初级
查看演示 下载资源 下载积分: 20 积分

CSS

.button{display: inline-block; outline: none; cursor: pointer; text-align: center; text-decoration: none; font: 16px/100% 'Microsoft yahei',Arial, Helvetica, sans-serif; padding: .5em 2em .55em; text-shadow: 0 1px 1px rgba(0,0,0,.3); -webkit-border-radius: .5em; -moz-border-radius: .5em; border-radius: .5em; -webkit-box-shadow: 0 1px 2px rgba(0,0,0,.2); -moz-box-shadow: 0 1px 2px rgba(0,0,0,.2); box-shadow: 0 1px 2px rgba(0,0,0,.2);} .button:hover{text-decoration: none;} .button:active{position: relative; top: 1px;}

HTML

<div class="demo">
    <a href="#" class="button green">绿色</a> 
    <a href="#" class="button green bigrounded">Rounded</a> 
    <a href="#" class="button green medium">Medium</a> 
    <a href="#" class="button green small">Small</a> 

    <input class="button green" type="button" value="Input Element" /> 
    <button class="button green">Button Tag</button>
</div>
标签: css3按钮圆角
评论0
头像

系统已开启自动识别垃圾评论机制,识别到的自动封号,下载出错或者资源有问题请联系全栈客服QQ 1915635791

1 2