前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >BUTTONS V. 2.0.0——CSS按钮库

BUTTONS V. 2.0.0——CSS按钮库

作者头像
小蔚
发布2019-09-12 13:03:54
6060
发布2019-09-12 13:03:54
举报
文章被收录于专栏:小蔚记录小蔚记录
 <!DOCTYPE html>
  2 <html lang="en">
  3 <head>
  4     <meta charset="UTF-8">
  5     <title>Buttons库学习</title>
  6     <style type="text/css">  
  7         body {
  8             margin: 0;
  9             padding: 0;
 10             font-family: "microsoft yahei";
 11             
 12         }
 13         a {
 14             text-decoration: none;
 15             outline: none;
 16         }
 17         /*
 18         * Base Button Style
 19         *
 20         * The default values for the .button class
 21         */
 22         .button {
 23           color: #666;
 24           background-color: #EEE;
 25           border-color: #EEE;
 26           font-weight: 300;
 27           font-size: 16px;
 28           font-family: "microsoft yahei","Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
 29           text-decoration: none;
 30           text-align: center;
 31           line-height: 40px;
 32           height: 40px;
 33           padding: 0 56px;
 34           margin: 10px;
 35           display: inline-block;
 36           appearance: none;
 37           cursor: pointer;
 38           border: none;
 39           -webkit-box-sizing: border-box;
 40              -moz-box-sizing: border-box;
 41                   box-sizing: border-box;
 42           -webkit-transition-property: all;
 43                   transition-property: all;
 44           -webkit-transition-duration: .3s;
 45                   transition-duration: .3s; }
 46 
 47         .button-large {
 48           font-size: 20px;
 49           height: 45px;
 50           line-height: 45px;
 51           padding: 0 45px; }
 52         
 53         /*
 54         * Button Shapes
 55         *
 56         * This file creates the various button shapes
 57         * (ex. Circle, Rounded, Pill)
 58         */
 59         .button-rounded {
 60               border-radius: 4px; }
 61         /*
 62         * Raised Buttons
 63         *
 64         * A classic looking button that offers
 65         * great depth and affordance.
 66         */
 67         .button-raised {
 68           border-color: #e1e1e1;
 69           border-style: solid;
 70           border-width: 1px;
 71           line-height: 38px;
 72           background: -webkit-gradient(linear, left top, left bottom, from(#f6f6f6), to(#e1e1e1));
 73           background: linear-gradient(#f6f6f6, #e1e1e1);
 74           -webkit-box-shadow: inset 0px 1px 0px rgba(255, 255, 255, 0.3), 0 1px 2px rgba(0, 0, 0, 0.15);
 75                   box-shadow: inset 0px 1px 0px rgba(255, 255, 255, 0.3), 0 1px 2px rgba(0, 0, 0, 0.15); }
 76         .button-raised:hover, .button-raised:focus {
 77             background: -webkit-gradient(linear, left top, left bottom, from(white), to(gainsboro));
 78             background: linear-gradient(top, white, gainsboro); }
 79         .button-raised:active, .button-raised.active, .button-raised.is-active {
 80             background: #eeeeee;
 81             -webkit-box-shadow: inset 0px 1px 3px rgba(0, 0, 0, 0.2), 0px 1px 0px white;
 82             box-shadow: inset 0px 1px 3px rgba(0, 0, 0, 0.2), 0px 1px 0px white; }
 83 
 84        /*
 85         * Base Colors
 86         *
 87         * Create colors for buttons
 88         * (.button-primary, .button-secondary, etc.)
 89         */         
 90         .button-primary:hover, .button-primary:focus{
 91             background-color: #4cb0f9;
 92             border-color: #4cb0f9;
 93             color: #FFF; }
 94 
 95         /*
 96         * Raised Button Colors
 97         *
 98         * Create colors for raised buttons
 99         */
100         .button-raised.button-primary {
101           border-color: #088ef0;
102           background: -webkit-gradient(linear, left top, left bottom, from(#34a5f8), to(#088ef0));
103           background: linear-gradient(#34a5f8, #088ef0); }
104         .button-raised.button-primary:hover, .button-raised.button-primary:focus {
105             background: -webkit-gradient(linear, left top, left bottom, from(#42abf8), to(#0888e6));
106             background: linear-gradient(top, #42abf8, #0888e6); }
107 
108         .button-highlight {
109           background-color: #FEAE1B;
110           border-color: #FEAE1B;
111           color: #FFF; }
112         .button-highlight:hover, .button-highlight:focus {
113             background-color: #fec04e;
114             border-color: #fec04e;
115             color: #FFF; }
116 
117     </style>
118 </head>
119 <body>
120     <a href="#none" class="button button-raised button-primary">GO</a>
121     <a href="#none" class="button button-large button-highlight button-rounded">Default-CSS</a>
122 </body>
123 </html>

参考资料 BUTTONSV. 2.0.0 Buttons 是一个高度可定制的、免费并且开源的按钮 CSS 样式库。

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2017-11-15 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档