首页 > Web开发 > 详细

css书写顺序

时间:2020-12-19 13:38:14      阅读:29      评论:0      收藏:0      [点我收藏+]

遵循以下顺序

布局定位属性

display / position / float / clear / visibility / overflow(建议 display 第一个写,毕竟关系到模式)

自身属性

width / height / margin / padding / border / background

文本属性

color / font / text-decoration / text-align / vertical-align / white- space / break-word

其他属性(CSS3)

content / cursor / border-radius / box-shadow / text-shadow / background:linear-gradient …

.jdc {
    display: block;
    position: relative;
    float: left;
    width: 100px;
    height: 100px;
    margin: 0 10px;
    padding: 20px 0;
    font-family: Arial, ‘Helvetica Neue‘, Helvetica, sans-serif;
    color: #333;
    background: rgba(0,0,0,.5);
    -webkit-border-radius: 10px;
    -moz-border-radius: 10px;
    -o-border-radius: 10px;
    -ms-border-radius: 10px;
    border-radius: 10px;
}

css书写顺序

原文:https://www.cnblogs.com/gongdhblog/p/14158713.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!