CSS learning (1) Introduction

What is CSS?

  • CSS means Cascading Style Sheets ( C ascading S tylE S heets)
  • Styles define how to display HTML elements
  • Style is typically stored in a style sheet in
  • Adding style to HTML 4.0 in order to solve the problem of the separation of content and presentation
  • External style sheet can greatly improve efficiency
  • External style sheet is usually stored in a CSS file in
  • A plurality of style definitions may be laminated as a

CSS Examples

CSS rule consists of two main parts: a selector, and one or more statements:

Selector usually you need to change the style of HTML elements.

Each statement consists of an attribute and a value.

Attribute (property) that you want to set the style attributes (style attribute). Each attribute has a value. And attribute value are separated by a colon.

CSS comments

Comments are used to explain your code, and can edit it, the browser will ignore it.

CSS comment with "/ *" starts with "* /" end

Guess you like

Origin www.cnblogs.com/1016391912pm/p/11538282.html