CSS Cascading style Beginner

Source: Internet
Author: User

I. Introduction of CSS

1, cascading style sheet: overlay effect, different CSS to the same HTML decoration, conflict parts, priority high effect, non-conflicting parts, common role

2. css function

(1) Modifying HTML
(2) Replace the label's own color, font size and other properties, improve the reusability of
(3) HTML content and style separation, facilitate post-maintenance

3. How to introduce CSS

(1) Inline style

<div style= "color:red;font-size:100" > Inline </div>

(2) Internal style (written in head)

<style type= "Text/css" >

DIV{COLOR:RED;FONT-SIZE:100}

INPUT{COLOR:RED;FONT-SIZE:100}

</style>

(3) Web global style

1. Create a CSS file

2. Type: div{color:red;font-size:200px}

3. Introduce the CSS file

<link ref= "stylesheet" href= "Cssdemo.css" type= "Text/css" >

(4) @import method

Basic No, reason lag in HTML loading CSS, does not support JS dynamic modification, some low IE version does not support

Summary:

Style: Tell the browser to use CSS to parse

The relationship between REF:CSS and HTML

The introduction is written in the head

The internal style is also written in the head.

CSS Cascading style Beginner

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.