编程知识 cdmana.com

Suggestion on writing order of CSS properties

1. Layout positioning properties :display / position / float / clear / visibility / overflow( Suggest display First write , After all, it's about patterns )

2. Self attribute :width / height / margin / padding / border / background

3. Text attribute :color / font / text-decoration / text-align / vertical-align / white- space / break-word

4. Other attributes (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;

}

版权声明
本文为[Waves Lala]所创,转载请带上原文链接,感谢

Scroll to Top