css concepts and basic grammar

The concept of 01 CSS

** CSS: Cascading Style Sheet Cascading Style Sheets **

Uses: performance style HTML file, set fonts, colors, margins, height, width, background images, page positioning settings.

02 CSS development history

  • Born in 1996 CSS1.0
  • In 1998 CSS2.0 released into the DIV + CSSde concept, put forward separate domains HTML CSS style sheets
  • In 2004 CSS2.1 released into the more advanced usage on the basis of CSS2.0, such as floating, positioning
  • 2010 CSS3.0 released, is currently the latest version of its trend towards modular, adding a lot of new technologies used, such as fonts, multiple backgrounds, rounded corners, shadows, animation and other advanced properties, but it requires high-level view device support

03 CSS advantage

  • Separation of content and presentation
  • Web page performance unified, easy to modify
  • Rich style, making more flexible page layout
  • Reducing the amount of code pages, increase Web browsing speed, save network bandwidth
  • Independent of the use of web pages, CSS, conducive pages indexed by search engines

04 basic grammar

  • grammar
Selector { 
Attribute 1: Property Value; // declare 1
Attribute 2: Property Value; // declaration 2
}
after the last injection CSS // declaration of ";" can not write to write, however, considered based on the W3C standards, proposed closure of the last statement should write ";"
  • Style tags
  • Location: in and between
  • Role: CSS code in the style tag declaration

 


operation result

 

Guess you like

Origin www.cnblogs.com/like-lry/p/11068534.html