亚洲中字慕日产2020,大陆极品少妇内射AAAAAA,无码av大香线蕉伊人久久,久久精品国产亚洲av麻豆网站

資訊專欄INFORMATION COLUMN

CSS基礎構架及標準

leon / 3018人閱讀

CSS Architecture base.less - Provide style reset and atomic functions

the project module(.epc-page) styles

body styles

font-family

font-size

color

width factor

common width

common.less - Abstract the component styles common to the site.

page layout

responsive width

common component styles

page.less - A particular style of a particular page.

All function pages must have their scope

Defining global styles is prohibited

CSS Written Order

Location attribute (position, top, right, z-index, display, float ...)

Size (width, height, padding, margin ...)

Text series (font, line-height, letter-spacing, color- text-align ...)

Background (background, border ...)

Other (animation, transition ...)

CSS Written Standard abbreviation CSS has some properties that can be abbreviated, such as padding, margin, font, etc. This streamlines the code while improving the user"s reading experience.

Remove the "0" before the decimal point

Abbreviated name-Easy to understand, but not casual.

Hyphenated CSS selector naming convention

Long names or phrases can use the middle dash to name selectors.
It is not recommended to use the "_" underscore to name the CSS selector. Why?

Press the shift key a little while typing.

Browser compatibility issues (named after a selector using _tips, for example, is invalid in IE6)

Well-distributed JavaScript variable naming (JS variable name is "_")

Do not use id freely

The ID is unique and high priority, so we should use it on demand.

Less usage Variables
@nice-blue: #5B83AD;
#header {
    color: @nice-blue;
}

We can define the font, size, color, etc. as constants.

Mixins
.bordered {
    border-top: dotted 1px black;
    border-bottom: solid 2px black;
}

.post a {
    color: red;
    .bordered;
}

We can transfer variables, Usage is similar to functions

Nested Rules
.header {
    color: black;
}

.header .navigation {
    font-size: 12px;
}

.header-logo {
    width: 300px;
}


.header {
    .navigation {
        font-size: 12px;
    }
    &-logo {
        width: 300px;
    }
}

Directives such as media or keyframe can be nested in the same way as selectors.

Namespaces and Accessors
#bundle {
    .button {
        display: block;
        border: 1px solid black;
        background-color: grey;
        &:hover {
            background-color: white
        }
    }
    .tab {
    ...
    }
    .citation {
    ...
    }
}

We should use the component"s namespace and scope.

Scope
@var: red;
#page {
   @var: white;
   #header {
      color: @var; // white
   }
}

文章版權歸作者所有,未經(jīng)允許請勿轉載,若此文章存在違規(guī)行為,您可以聯(lián)系管理員刪除。

轉載請注明本文地址:http://www.ezyhdfw.cn/yun/113359.html

相關文章

  • 云計算與 Cloud Native | 數(shù)人云CEO王璞@KVM分享實錄

    摘要:分享實錄云計算技術源于互聯(lián)網(wǎng)公司,現(xiàn)在云計算已經(jīng)是下一代企業(yè)級的發(fā)展趨勢。如何做云計算一直是云計算技術的領導者?;ヂ?lián)網(wǎng)公司的快速發(fā)展,已經(jīng)印證了云計算技術和云原生應用相比傳統(tǒng)構架的巨大優(yōu)勢。 今天小數(shù)又給大家?guī)硪黄韶洕M滿的分享——來自KVM社區(qū)線上群分享的實錄,分享嘉賓是數(shù)人云CEO王璞,題目是《云計算與 Cloud Native》。這是數(shù)人云在KVM社區(qū)群分享的第一彈,之后還有數(shù)...

    _Zhao 評論0 收藏0
  • 穩(wěn)定高于一切的金融行業(yè)如何用容器?

    摘要:在谷歌不是這樣,谷歌不會把特定的應用裝在某臺服務器上,業(yè)務應用和服務器的強綁定對于谷歌這種量級的數(shù)據(jù)中心的維護難度太高了。但是金融機構的數(shù)據(jù)中心規(guī)模不像谷歌這么大,所以能做到業(yè)務應用和硬件的強綁定。 復雜的基礎IT架構是傳統(tǒng)金融的現(xiàn)狀,如何快速響應用戶需求,加快新業(yè)務上線速度,縮短產(chǎn)品的迭代周期? 數(shù)人云在容器落地金融云的2年實踐中,實現(xiàn)金融核心業(yè)務技術WebLogic、J2EE、Or...

    scola666 評論0 收藏0
  • 為什么響應式編程并非一時之勢?

    摘要:編者按本文作者為,文章從程序架構與系統(tǒng)的發(fā)展歷程出發(fā),逐步論證了為什么響應式編程并非一時之勢,而是能帶來更快處理速度,更高硬件利用率的未來選擇。這就是摩爾定律所說的應用程序。響應式方法并非一時之勢它是編寫軟件的未來趨勢。 【編者按】本文作者為 David Buschman,文章從程序架構與系統(tǒng)的發(fā)展歷程出發(fā),逐步論證了為什么響應式編程并非一時之勢,而是能帶來更快處理速度,更高硬件利用率...

    JessYanCoding 評論0 收藏0
  • 關于CSS Reset 那些事(四)之 構架CSS基礎樣式庫

    摘要:現(xiàn)在回到我們這一章節(jié)的標題,將它做下補充關于那些事四之基于構架基礎樣式庫基礎庫構思為什么要做基礎庫我上一章節(jié)的末尾拋出了幾個問題假設你要做一個游戲單頁面,網(wǎng)頁上并不存在表單內(nèi)容,那么你就要移除一些冗余的代碼,開始自定義樣式來滿足自己的需求。 前言 先來回顧一下前幾章節(jié),我們都說了哪些內(nèi)容: CSS Reset 歷史 與 Normalize.css 介紹 Normalize.css...

    mj 評論0 收藏0

發(fā)表評論

0條評論

leon

|高級講師

TA的文章

閱讀更多
最新活動
閱讀需要支付1元查看
<