CSS Application Basics Tutorial (1) Basic knowledge

Source: Internet
Author: User
Tags reference relative
css| Basic Tutorials
An introduction to C s S

CSS is the abbreviation of "cascading style Sheets", Chinese turn to "threaded style sheet", and some people only turn to "style sheet". CSS is used as a Web page layout and style design, in the so-called "new Web page", CSS is undoubtedly a very important link. CSS is based on existing, to make up for both the existing HTML specifications in the deficiencies, but also to make the design of the Web page more flexible.

This teaching document will come to introduce you to the application of CSS ROM! In this side does not introduce all the CSS specifications, only on your Web page writing more commonly used, more likely to use the syntax of the part and the application of the method to introduce you. Also due to the compatibility of the two browsers is gradually drifting away, will be attentive to your support for this syntax browser. IE has been supporting some grammar since 3.0, which will be noted for you.
A brief introduction to each chapter

For your reference and learning convenience, here first for you to explain the content of each chapter of the teaching document it! Let you have a direction and concept in reference. Basically, the first two chapters focus on the establishment of concepts and basic cognition, which is to do some work for you. The third chapter gives you a description and introduction of some other ways or features of application and setup. The fourth and sixth chapters focus on the introduction of grammar, parameters and nature, which is really built in the style sheet inside the Dongdong.

The first chapter of the basic knowledge of CSS: This is the chapter! Introduce you to some basic concepts of CSS and understanding. The second chapter of the application of CSS: for you to introduce the basic declaration of CSS, application methods and characteristics of the introduction. The third chapter of the application of CSS to add: to introduce you to other forms of CSS declaration, application and characteristics of the introduction. Fourth chapter page nature of CSS: for you to introduce the nature of the page CSS related syntax, parameters and nature. The fifth chapter text nature of the CSS: for you to introduce the character of the CSS-related syntax, parameters and properties. The sixth chapter blocks the nature of CSS: for you to introduce the nature of the block CSS related syntax, parameters and properties.
Basic knowledge of application

The application of CSS is not difficult, but please refer to the basic understanding here, some words have a little basic concepts, for you look at the back of the teaching will be helpful, it looks like it will not be too strenuous!

Understanding of basic terminology: Elements (Element): the tag (tag) in the basic HTML syntax.
attribute: An attribute used to describe a label attribute.
For example: Style: A property of a group or array that describes the characteristics of a component.
Selector (selector): A component of the applied style.
For example:

h3{Color:blue}, H3 is the pick, color is the property, BLUE is a color value.

Second, the basic unit of understanding:
There are two units of relative units and absolute units to express the way.
Relative units:

"em": the proportional factor relative to the letter height.
"EN": proportional factor relative to the font size.
"%": an example of a percentage relative to the length unit (usually the size of the current font). Absolute unit: "in": inches.
"cm": cm.
"MM": mm.
"px": Pixel (System preset unit).
"PC": Pica, printing type unit.
"PT": Like Dot.

Relative relationship: 1in= 6pc= 72pt= 2.54cm= 25.4mm

Third, the use of color awareness:

There are five different ways to represent colors.
"#RRGGBB": Values of red, green, and blue primary colors that represent 0 to 2,550 decimal values, respectively, with a value of three 00 to FF 16. "#RGB": a shorthand notation that uses only three 0 to F 16 values to represent the red, green, and blue primary colors respectively. In fact, the browser automatically expands to six-16-digit values, such as "#ABC" will change to "#AABBCC". However, it is not obvious that such a notation is accurate. RGB (R,G,B): color is represented by a value of red, green, and blue Primary colors from 0 to 2,550 decimal values. "RGB (r%,g%,b%)": Red, green, blue relative to each other in the numerical scale to represent the color, such as "RGB (60%,100%,75%)." "Color_name": color is directly represented by the color name, there are 141 kinds of standard color names.

Four, the understanding of the URL representation: CSS URL represents a total of five ways, and are legitimate declarations, you can choose by yourself.
URL (Http://yourweb/path/file_name)
URL (' Http://yourweb/path/file_name ')
URL ("Http://yourweb/path/file_name")
URL (' Http://yourweb/path/file_name ')
URL ("Http://yourweb/path/file_name")

With these basic ideas and concepts, the next step is to introduce you to the CSS application method Luo!



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.