min.css----全世界最快的CSS架構

來源:互聯網
上載者:User

標籤:

 有一個CSS架構,叫min.css,它號稱是全世界最快的。

難怪,它的代碼就這一點。

你看它的頁面例子,像Bootstrap,但比後者輕多了,它只是一些CSS樣式,沒有JavaScript代碼。

min.css的組件有: 基本代碼(必須)、標題、按鈕、表單、導覽列、表格、表徵圖、網格、訊息框。

對,這就是min.css的全部。

1. 基本代碼
body,textarea,input,select {    background: 0;    border-radius: 0;    font: 16px sans-serif;    margin: 0}.addon,.btn-sm,.nav,textarea,input,select {    outline: 0;    font-size: 14px}.smooth {    transition: all .2s}.btn,.nav a {    text-decoration: none}.container {    margin: 0 20px;    width: auto}@media(min-width:1310px) {    .container {        margin: auto;        width: 1270px    }}.btn,h2 {    font-size: 2em}

這是全部的基本代碼。

 


2. 標題 
h1 {    font-size: 3em}

 

3. 按鈕 
.btn {    background: #999;    border-radius: 6px;    border: 0;    color: #fff;    cursor: pointer;    display: inline-block;    margin: 2px 0;    padding: 12px 30px 14px}.btn:hover {    background: #888}.btn:active,.btn:focus {    background: #777}.btn-a {    background: #0ae}.btn-a:hover {    background: #09d}.btn-a:active,.btn-a:focus {    background: #08b}.btn-b {    background: #3c5}.btn-b:hover {    background: #2b4}.btn-b:active,.btn-b:focus {    background: #2a4}.btn-c {    background: #d33}.btn-c:hover {    background: #c22}.btn-c:active,.btn-c:focus {    background: #b22}.btn-sm {    border-radius: 4px;    padding: 10px 14px 11px}

 

4. 表單 
label>* {    display: inline}form>* {    display: block;    margin-bottom: 10px}textarea,input,select {    border: 1px solid #ccc;    padding: 8px}textarea:focus,input:focus,select:focus {    border-color: #5ab}textarea,input[type=text] {    -webkit-appearance: none;    width: 13em;    outline: 0}.addon {    box-shadow: 0 0 0 1px #ccc;    padding: 8px 12px}

5. 導覽列 
.nav,.nav .current,.nav a:hover {    background: #000;    color: #fff}.nav {    height: 24px;    padding: 11px 0 15px}.nav a {    color: #aaa;    padding-right: 1em;    position: relative;    top: -1px}.nav .pagename {    font-size: 22px;    top: 1px}.btn.btn-close {    background: #000;    float: right;    font-size: 25px;    margin: -54px 7px;    display: none}@media(max-width:500px) {    .btn.btn-close {        display: block    }    .nav {        overflow: hidden    }    .pagename {        margin-top: -11px    }    .nav:active,.nav:focus {        height: auto    }    .nav div:before {        background: #000;        border-bottom: 10px double;        border-top: 3px solid;        content: ‘‘;        float: right;        height: 4px;        position: relative;        right: 3px;        top: 14px;        width: 20px    }    .nav a {        display: block;        padding: .5em 0;        width: 50%    }}

6. 表格 
.table th,.table td {    padding: .5em;    text-align: left}.table tbody>:nth-child(2n-1) {    background: #ddd}

7. 表徵圖 
.ico {    font: 33px Arial Unicode MS,Lucida Sans Unicode}

8. 網格 
.row {    margin: 1% 0;    overflow: auto}.col {    float: left}.table,.c12 {    width: 100%}.c11 {    width: 91.66%}.c10 {    width: 83.33%}.c9 {    width: 75%}.c8 {    width: 66.66%}.c7 {    width: 58.33%}.c6 {    width: 50%}.c5 {    width: 41.66%}.c4 {    width: 33.33%}.c3 {    width: 25%}.c2 {    width: 16.66%}.c1 {    width: 8.33%}@media(max-width:870px) {    .row .col {        width: 100%    }}

9. 訊息框 
.msg {    background: #def;    border-left: 5px solid #59d;    padding: 1.5em}

 

(完)

min.css----全世界最快的CSS架構

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.