• css书写规范


    • 属性的书写顺要有一定的规律。
      1. Display & Flow
      2. Positioning
      3. Dimensions
      4. Margins, Padding, Borders, Outline
      5. Typographic Styles
      6. Backgrounds
      7. Opacity, Cursors, Generated Content
     从上到下的书写顺序示例:
     
     .foobar {
        display: ;
        visibility: ;
        float: ;
        clear: ;
     
        position: ;
        top: ;
        right: ;
        bottom: ;
        left: ;
        z-index: ;
     
         ;
        min- ;
        max- ;
        height: ;
        min-height: ;
        max-height: ;
        overflow: ;
     
        margin: ;
        margin-top: ;
        margin-right: ;
        margin-bottom: ;
        margin-left: ;
     
        padding: ;
        padding-top: ;
        padding-right: ;
        padding-bottom: ;
        padding-left: ;
     
        border: ;
        border-top: ;
        border-right: ;
        border-bottom: ;
        border-left: ;
     
        border- ;
        border-top- ;
        border-right- ;
        border-bottom- ;
        border-left- ;
     
        border-style: ;
        border-top-style: ;
        border-right-style: ;
        border-bottom-style: ;
        border-left-style: ;
     
        border-color: ;
        border-top-color: ;
        border-right-color: ;
        border-bottom-color: ;
        border-left-color: ;
     
        outline: ;
     
        list-style: ;
     
        table-layout: ;
        caption-side: ;
        border-collapse: ;
        border-spacing: ;
        empty-cells: ;
     
        font: ;
        font-family: ;
        font-size: ;
        line-height: ;
        font-weight: ;
        text-align: ;
        text-indent: ;
        text-transform: ;
        text-decoration: ;
        letter-spacing: ;
        word-spacing: ;
        white-space: ;
        vertical-align: ;
        color: ;
     
        background: ;
        background-color: ;
        background-image: ;
        background-repeat: ;
        background-position: ;
     
        opacity: ;
     
        cursor: ;
     
        content: ;
     
        quotes: ;
     
      }
    

      

  • 相关阅读:
    vs2010 在函数级别设置优化
    从快速排序开始的代码演化
    pocket API学习笔记
    工作笔记:复制文件--从windows到ubuntu,再到fedora
    Win10 64位 Apache 2.4+MySQL 5.7+PHP 7环境搭建
    Json简介
    TCP/IP 协议详解和运作过程
    PHP 编程中 10 个最常见的错误,你犯过几个?
    php中的扩展解析
    php.ini设置详解
  • 原文地址:https://www.cnblogs.com/padding1015/p/7232456.html
Copyright © 2020-2023  润新知