CSS syntax and how to set it up

Source: Internet
Author: User

CSS Syntax

Format

Property: Value: Property, Value 1: Property 1. ..... ;

Properties and values using the colon ":"

Unit

Color:#rgb #8fa #aaffaa Red Green

Size:em 2em px pt% pc cm mm in

URL(url)

Comments/ * ... */ in which you do not include comments

four ways to set up CSS

Inline style sheet: Inline with the style attribute in HTML element tags (each HTML tag can be styled)

Embedded style sheet: html <style> tag jiang CSS embedded in HTML (You can control all styles of the current page)

External style Sheets: Define styles separately in a document with a . css suffix and link to HTML in HTML via the link element used in the.

Input style sheet: You can enter a style file into another style library file, or enter a style file into the <style> element.

Their priority level: inline is higher than others, and the other is related to the loading order.


This article is from "Xiao Liu _blog" blog, please be sure to keep this source http://liuyafang.blog.51cto.com/8837978/1412578

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.