CSS (1), CSS (

Source: Internet
Author: User

CSS (1), CSS (

1. CSS (Cascading Style Sheet) stacked Style sheets.

A markup language used to control webpage styles and allow separation of style information from webpage content.

2. CSS Introduction

1) Intra-row style

Add style directly behind the tag and set CSS attributes and attribute values <p> 2) inline style

Add <style = "type/css"> </style> to

3) Link (recommended)

<Link rel = "stylesheet" type = "text/css" href = "CSS/demo.css">

4) import a style (not required)

<Style> @ import url(1.css) </style>

3. CSS Selector

1) Tag Selector

P {font-size: 12px; background-color: #00 FFFF; color: # FF0033 ;}

2) category Selector

. DemoClass {font-size: 12px; background-color: #900; color: 090 ;}

3) ID Selector

# DemoID {font-size: 30px; background-color: # 0099FF; color: # FFFF00 ;}

Selector priority: ID selector> category selector> tag Selector

4. CSS text Effect

1) font: font-family

2) text size: font-size

3) text color: color

4) text width: font-weight

5) Text

Underline: text-decoration: underline;

Strikethrough: text-decoration: overline;

Fixed line: text-decoration: line-through;

6) uppercase/lowercase letters

Uppercase letters: text-transform: capitalize;

Uppercase words: text-transform: uppercase;

All lowercase words: text-transform: lowercase;

7) the default text spacing between letter and spacing is normal;

8) align

Horizontal center text-align: center;

9) line spacing line-height

Vertical center line-height: container height;

5. image effects

1) image border

Border type border-style dotted dashed dotted line solid line

Border color border-color

Border width border-width

2) text Mixing

Set float

3) Background

Background color: background-color

Background image: background-image

Repeated Images

Repeat in the horizontal direction: background-repeat: repeat-x;

Repeat background-repeat: repeat-y in the vertical direction;

Do not repeat background-repeat: no-repeat;

Image position: background-position

Fixed background image: background-attachment: fixed;

 

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.