Must know css shorthand properties

COLOR

Before:

Color: #000000;

Color: #88FFO0;

After:

Color: #000;

Color: #8FO;

Border:

Before:

Border-width: 1px;

Border-style: solid;

Border-color: black;

After:

Background: 1px solid black;

Background

Before:

Background-color: #fff;

Background-image: imagejpeg

Background-repeat: no-repeat;

Background-position: center;

Background-attachment: fixed;

After:

Background: #fff image.jpeg no-repeat center Fixed;

Margin

Before:

Margin-top: 1em;

Margin-right: 2em;

Margin-bottom: 3em;

Margin-left: 4em;

After:

Margin: 1em 2em 3em 4em;

Moving clockwise from top, always keep TRBL in your mind.

Leave a Reply

Your email address will not be published.