CSS Backgrounds and lists

Source: Internet
Author: User
Tags set background

    • use of backgrounds in CSS
    • Use of lists in CSS

15.1 The use of backgrounds in CSS

Property name property value description

background-attachment Scroll Setting the background image scrolls with the window

Move as the bar moves.

fixed Setting the background image does not scroll with the window bar

Movement of the mobile.

Background-color                 hexadecimal background-color: #ff0000;

English name background-color:red;

Tri-primary color Background-color:rgb (255,0,0)

Transparent background-color:transparent; Transparent

background-image URL background-image:url ("bg.jpg")

Background Image

None do not set a background picture

background-position Top Left set the background pattern to appear on the left.

                                                        top center         Sets the background pattern to appear in the middle.

                                                        top right          Sets the background pattern to appear on the right.

                                                        center left        Span style= "font-family: Equal line" > Sets the background pattern to appear in the middle left.

                                                        center center      Set background pattern appears in ie middle.

                                                        center right       Set the background pattern to appear to the right of the center.

                                                        bottom left        Span style= "font-family: Equal line" > Sets the background pattern to appear on the left.

                                                        bottom              Set the background pattern right below it.

Bottom Right set the background pattern to appear to the right.

Background-repeat Repeat fills a background pattern with the entire background.

Repeat-x fills the background pattern in the horizontal direction.

repeat-y fills the background pattern in the vertical direction.

no-repeat The pattern appears only once.

Background Pattern simplification scenario:

background: Color background image repeat attachment position

Example:background:Blue URL ("xxx.jpg") n O-repeat Fixed Center Center

15.2 The use of lists in CSS

Property name property value description

List-style-type None No sign

Disc the small dot of the entity.

Circle a small, hollow dot.

Square a small, solid block.

Decimal ...

Lower-roman I,II,III ...

Upper-roman I,II,III ...

Lower-alpha a,b,c,d,e ...

Upper-alpha a,b,c,d,e ...

list-style-position inside The list item moves more to the right.

outside The list item is displayed correctly.

List-style-image URL List-style-image:url (lmk.gif)

None does not display any images

Simplified setup of the Checklist:

List-style:circle inside URL ("Bullet.gif")

CSS Backgrounds and lists

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.