<!DOCTYPE html> <html> <head> <title>Buttons</title> <style type="text/css"> body { margin: 100px auto; width: 300px; } a.button { background: rgb(249, 252, 252); background: -moz-linear-gradient(top, rgb(249, 252, 252) 0%, rgb(211, 227, 232) 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, rgb(249, 252, 252)), color-stop(100%, rgb(211, 227, 232))); background: -webkit-linear-gradient(top, rgb(249, 252, 252) 0%, rgb(211, 227, 232) 100%); background: -o-linear-gradient(top, rgb(249, 252, 252) 0%, rgb(211, 227, 232) 100%); background: -ms-linear-gradient(top, rgb(249, 252, 252) 0%, rgb(211, 227, 232) 100%); background: linear-gradient(to bottom, rgb(249, 252, 252) 0%, rgb(211, 227, 232) 100%); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#F9FCFC', endColorstr='#D3E3E8',GradientType=0); border: 1px solid rgb(180, 199, 208); border-top: 1px solid rgb(220, 233, 237); border-bottom: 1px solid rgb(189, 205, 213); border-radius: 4px; -webkit-border-radius: 4px; box-shadow: 0px 1px 1px rgba(0, 0, 0 ,0.075), inset 0px 1px 0px rgb(255, 255, 255), inset 0px -1px 0px rgba(255, 255, 255, 0.75); color: rgb(117, 151, 169); display: inline-block; *display: inline; zoom: 1; font-family: "Helvetica Neue", Helvetica, Arial; font-size: 0.8em; outline: none; padding: 5px 8px; text-decoration: none; text-shadow: 0px 1px 0px rgb(255, 255, 255); transition: all 0.2s ease-in-out; -webkit-transition: all 0.2s ease-in-out; -moz-transition: all 0.2s ease-in-out; -ms-transition: all 0.2s ease-in-out; -o-transition: all 0.2s ease-in-out; -webkit-transform: translate3d(0, 0px, 0); -webkit-font-smoothing: antialiased; } a.button:hover { opacity: 0.7; -webkit-transform: translate3d(0, -3px, 0); } a.button:active { background: rgb(211,227,232); background: linear-gradient(to bottom, rgb(211, 227, 232) 0%, rgb(249, 252, 252) 100%); background: -moz-linear-gradient(top, rgb(211, 227, 232) 0%, rgb(249, 252, 252) 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, rgb(211, 227, 232)), color-stop(100%, rgb(249, 252, 252))); background: -webkit-linear-gradient(top, rgb(211, 227, 232) 0%, rgb(249, 252, 252) 100%); background: -o-linear-gradient(top, rgb(211, 227, 232) 0%, rgb(249, 252, 252) 100%); background: -ms-linear-gradient(top, rgb(211, 227, 232) 0%, rgb(249, 252, 252) 100%); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#d3e3e8', endColorstr='#f9fcfc', GradientType=0); box-shadow: inset 0px 1px 2px rgba(104, 131, 160, 0.2); border-top: 1px solid rgb(180, 199, 208); opacity: 1; } a.button.green{ background: rgb(254,254,253); background: linear-gradient(to bottom, rgb(254, 254, 253) 0%, rgb(226, 234, 201) 100%); background: -moz-linear-gradient(top, rgb(254, 254, 253) 0%, rgb(226, 234, 201) 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, rgb(254, 254, 253)), color-stop(100%, rgb(226, 234, 201))); background: -webkit-linear-gradient(top, rgb(254, 254, 253) 0%, rgb(226, 234, 201) 100%); background: -o-linear-gradient(top, rgb(254, 254, 253) 0%, rgb(226, 234, 201) 100%); background: -ms-linear-gradient(top, rgb(254, 254, 253) 0%, rgb(226, 234, 201) 100%); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fefefd', endColorstr='#e2eac9', GradientType=0); border: 1px solid rgb(194, 207, 152); border-top: 1px solid rgb(227, 235, 205); border-bottom: 1px solid rgb(190, 204, 144); box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.08), inset 0px 1px 0px rgb(255,255,255), inset 0px -1px 0px rgba(255, 255, 255, 0.75); color: rgb(148, 172, 94); } a.button.green:active { background: rgb(220, 227, 196); background: linear-gradient(to bottom, rgb(220, 227, 196) 2%, rgb(254, 254, 253) 100%); background: -moz-linear-gradient(top, rgb(220, 227, 196) 2%, rgb(254, 254, 253) 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(2%, rgb(220, 227, 196)), color-stop(100%, rgb(254, 254, 253))); background: -webkit-linear-gradient(top, rgb(220, 227, 196) 2%, rgb(254, 254, 253) 100%); background: -o-linear-gradient(top, rgb(220, 227, 196) 2%, rgb(254, 254, 253) 100%); background: -ms-linear-gradient(top, rgb(220, 227, 196) 2%, rgb(254, 254, 253) 100%); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#dce3c4', endColorstr='#fefefd',GradientType=0); border-top: 1px solid rgb(194, 207, 152); box-shadow: inset 0px 1px 2px rgba(174, 191, 118, 0.2); } a.button.orange { background: rgb(254, 252, 234); background: linear-gradient(to bottom, rgb(254, 252, 234) 0%, rgb(244, 219, 156) 100%); background: -moz-linear-gradient(top, rgb(254, 252, 234) 0%, rgb(244, 219, 156) 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, rgb(254, 252, 234)), color-stop(100%, rgb(244, 219, 156))); background: -webkit-linear-gradient(top, rgb(254, 252, 234) 0%, rgb(244, 219, 156) 100%); background: -o-linear-gradient(top, rgb(254, 252, 234) 0%, rgb(244, 219, 156) 100%); background: -ms-linear-gradient(top, rgb(254, 252, 234) 0%, rgb(244, 219, 156) 100%); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fefcea', endColorstr='#f4db9c',GradientType=0); border: 1px solid rgb(228, 195, 111); border-top: 1px solid rgb(245, 224, 167); border-bottom: 1px solid rgb(219, 179, 78); box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.1), inset 0px 1px 0px rgb(255, 255, 255), inset 0px -1px 0px rgba(255, 255, 255, 0.5); color: rgb(213, 164, 35); } a.button.orange:active{ background: rgb(247,220,148); background: linear-gradient(to bottom, rgb(247, 220, 148) 0%, rgb(254, 252, 234) 100%); background: -moz-linear-gradient(top, rgb(247, 220, 148) 0%, rgb(254, 252, 234) 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, rgb(247, 220, 148)), color-stop(100%, rgb(254, 252, 234))); background: -webkit-linear-gradient(top, rgb(247, 220, 148) 0%, rgb(254, 252, 234) 100%); background: -o-linear-gradient(top, rgb(247, 220, 148) 0%, rgb(254, 252, 234) 100%); background: -ms-linear-gradient(top, rgb(247, 220, 148) 0%, rgb(254, 252, 234) 100%); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f7dc94', endColorstr='#fefcea',GradientType=0 ); border-top: 1px solid rgb(228, 195, 111); box-shadow: inset 0px 1px 2px rgba(191, 140, 0, 0.2); } </style> </head> <body> <a href="#" class="button green">Test</a> <a href="#" class="button blue">Test</a> <a href="#" class="button orange">Test</a> </body> </html>
详细解决方案
类乎的按钮样式
热度:117 发布时间:2013-07-20 11:07:48.0
相关解决方案