美文网首页
命名规范

命名规范

作者: yuxiaohu | 来源:发表于2017-08-31 09:22 被阅读0次

A我今天学到了什么

1 命名规范

命名规范 image.png

2 几种常用的命名方式

<body>
<div class="top"></div>
<div class="topContent"></div>
<div class="top-content"></div>
<div class="top_content"></div>
</body>

3 伪元素设置边框

    <style>
        .center{margin-left: auto;margin-right: auto}
        .row:after{content: "";display: table;clear: both}
        .box{
            width: 700px;
            height: 300px;
            border: 1px solid #666;
        }
        .box>div{
            width: 25%;
            height: 100%;
            float: left;
            position: relative;
        }
        .box>div:after{
            content: "";
            display: block;
            width: 100%;
            height: 100%;
            border-right: 1px solid #666;
            position: absolute;
            top: 0;
            left: 0;
            pointer-events: none;
            z-index: 100px;
        }
    </style>
</head>
<body>
<div class="box center row">
    <div></div>
    <div></div>
    <div></div>
    <div></div>
</div>

4 建立自己的公共样式

4.1 base 存放底层的样式,不会改变

* {margin: 0;padding: 0}
ul {list-style: none }
table {border-collapse: collapse;}
body {
    font-size: 14px;
    font-family: -apple-system, SF UI Text, Arial, PingFang SC, Hiragino Sans GB, Microsoft YaHei, WenQuanYi Micro Hei, sans-serif;
}
body, a {color: #333;}
a {cursor: pointer;text-decoration: none;}
.center {margin-left: auto; margin-right: auto;}
.row:after {
    content: "";
    display: table;
    clear: both;
}
.col-1 {width: 8.33333333%;}
.col-2 {width: 16.66666667%;}
.col-3 {width: 25%;}
.col-4 {width: 33.33333333%;}
.col-5 {width: 41.66666667%;}
.col-6 {width: 50%;}
.col-7 {width: 58.33333333%;}
.col-8 {width: 66.66666667%;}
.col-9 {width: 75%;}
.col-10 {width: 83.33333333%;}
.col-11 {width: 91.66666667%;}
.col-12 {width: 100%;}
.col-1, .col-2, .col-3, .col-4, .col-5, .col-6, .col-7, .col-8, .col-9, .col-10, .col-11, .col-12 {
    float: left;height:100%;
}
.float-l{float: left}
.float-r{float: right}
.rel{position:relative;}
.abs{position: absolute}
.false-l:after{
    content:"";
    display: table;
    height:100%;
    width:100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 100;
    border-right:1px solid #eee;
    pointer-events: none;
}

4.2 common 存放公共的样式,有些改变,一般用于存放公司的样式

例如特定的网页色调,文字大小等.....

4.3 page1 当前网页的样式

当前网页的样式

相关文章

  • 适合各厂使用的 MySQL 团队开发规范,太详细了,建议收藏!

    数据库对象命名规范 数据库对象 数据库对象全局命名规范 数据库命名规范 表命名规范 字段命名规范 索引命名规范 视...

  • 代码书写规范

    res命名规范: src中命名规范: 习惯命名:

  • Android开发中的优化方案

    一、命名规范 代码规范先从命名规范开始,Android的命名规范主要涉及:Java源代码,xml文件,图片资源。 ...

  • Swift--规范编程

    命名规范 注释规范 声明 代码排版 命名规范 常用命名方法 匈牙利命名,一般只是命名变量,原则是: 变量名 = 类...

  • Flutter 代码规范

    命名规范 命名规范中包括了文件以及文件夹的命名规范,常量和变量的命名规范,类的命令规范。Dart 中只包含这三种命...

  • 入门13 CSS综合

    CSS编码规范 命名规范:语义化标签优先;基于功能命名、基于内容命名、基于表现命名;简略、明了、无后患 书写规范:...

  • 规范文档

    1.命名规范2.注释规范3.代码规范4.目录规范 1.命名规范 通用规范通用规范是在整个项目中,所有的命名都需要遵...

  • 内部前端规范v1.0

    项目目录结构规范 请查看 项目目录结构规范 HTML 命名规范 class 命名实行 BEM命名方式。关于BEM,...

  • [知识点滴]Div+CSS命名规范大全

    Div+CSS命名规范(前端web开发命名规范)Div+CSS命名规范(一)窗体头:header内容:conten...

  • 2018-06-28 python命名规范

    Python命名规范 Google Python****命名规范 module_name, 模块 package...

网友评论

      本文标题:命名规范

      本文链接:https://www.haomeiwen.com/subject/xlwfjxtx.html