A style declaration consists of a simple assignment: a CSS property is given a specific value. This is the heart of CSS - the assignment of rendering properties. A CSS property is followed by a colon character (':'), which is followed in turn by a value appropriate to the property. White space around all of these declaration components is optional.
css selector
CSS selectors are the heart and soul of CSS. They define which HTML elements you are going to be manipulating with CSS code and you should have a solid understanding of them when you are finished with this tutorial. Luckily for you, they are pretty simple to comprehend!
- SELECTOR { PROPERTY: VALUE }
"Property" is the CSS element you wish to manipulate and "VALUE" represents the value of the specified property.
declaration:The position declaration lets you declare what the position of an element should be.
This is the test element. It has the following styles:
top: 100px;
left: 100px;
padding: 1em;
border: 1px solid #cc0000;
No comments:
Post a Comment