赞
踩
——注:源码里面使用了多种html标签做成按钮,有a,input,span,div,p,h3。总有适合你的标签
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
- <title>Demo: CSS3 Buttons</title>
- <style type="text/css">
- body {
- background: #ededed;
- width: 900px;
- margin: 30px auto;
- color: #999;
- }
- p {
- margin: 0 0 2em;
- }
- h1 {
- margin: 0;
- }
- a {
- color: #339;
- text-decoration: none;
- }
- a:hover {
- text-decoration: underline;
- }
- div {
- padding: 20px 0;
- border-bottom: solid 1px #ccc;
- }
-
- /* button
- ---------------------------------------------- */
- .button {
- display: inline-block;
- zoom: 1; /* zoom and *display = ie7 hack for display:inline-block */
- *display: inline;
- vertical-align: baseline;
- margin: 0 2px;
- outline: none;
- cursor: pointer;
- text-align: center;
- text-decoration: none;
- font: 14px/100% 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;
- }
-
- .bigrounded {
- -webkit-border-radius: 2em;
- -moz-border-radius: 2em;
- border-radius: 2em;
- }
- .medium {
- font-size: 12px;
- padding: .4em 1.5em .42em;
- }
- .small {
- font-size: 11px;
- padding: .2em 1em .275em;
- }
-
- /* color styles
- ---------------------------------------------- */
-
- /* black */
- .black {
- color: #d7d7d7;
- border: solid 1px #333;
- background: #333;
- background: -webkit-gradient(linear, left top, left bottom, from(#666), to(#000));
- background: -moz-linear-gradient(top, #666, #000);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#666666', endColorstr='#000000');
- }
- .black:hover {
- background: #000;
- background: -webkit-gradient(linear, left top, left bottom, from(#444), to(#000));
- background: -moz-linear-gradient(top, #444, #000);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#444444', endColorstr='#000000');
- }
- .black:active {
- color: #666;
- background: -webkit-gradient(linear, left top, left bottom, from(#000), to(#444));
- background: -moz-linear-gradient(top, #000, #444);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#000000', endColorstr='#666666');
- }
-
- /* gray */
- .gray {
- color: #e9e9e9;
- border: solid 1px #555;
- background: #6e6e6e;
- background: -webkit-gradient(linear, left top, left bottom, from(#888), to(#575757));
- background: -moz-linear-gradient(top, #888, #575757);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#888888', endColorstr='#575757');
- }
- .gray:hover {
- background: #616161;
- background: -webkit-gradient(linear, left top, left bottom, from(#757575), to(#4b4b4b));
- background: -moz-linear-gradient(top, #757575, #4b4b4b);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#757575', endColorstr
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。