1、圆角边框 border-radius
2、文字有背景 text-shadow
3、按钮有阴影 box-shadow
4、文字有向上的阴影 text-shadow
5、按钮背景色有个从上往下的渐变效果 linear-gradient
6、点击后明显有个下按效果
.btn{ background-color: #ee432e; background-image: -webkit-linear-gradient(top, #ee432e 0%, #c63929 50%,#b51700 50%, #891100 100%); background-image: -moz-linear-gradient(top, #ee432e 0%, #c63929 50%,#b51700 50%, #891100 100%); background-image: -o-linear-gradient(top, #ee432e 0%, #c63929 50%, #b51700 50%, #891100 100%); background-image: linear-gradient(top, #ee432e 0%, #c63929 50%, #b51700 50%, #891100 100%); border: 1px solid #951100; padding: 12px 20px 14px 20px; border-radius: 5px; text-decoration: none; color: #fff; font: bold 20px/1 “helvetica neue”, helvetica, arial, sans-serif; text-align: center; box-shadow: 0 1px 3px #333333; text-shadow: 0px -1px 1px rgba(0, 0, 0, 0.8); position:relative; display:inline-block; cursor:pointer; } .btn:active { position: relative; top: 1px; }aaa
查看更多关于css3制作一个漂亮的按钮_html/css_WEB-ITnose的详细内容...
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://www.haodehen.cn/did107361