CSS Properties-1

Source: Internet
Author: User
Tags set background


CSS Properties

About the size of

Width setting width

Height Set high

Min-width: Set minimum width

Max-width: Set Maximum width

Min-height: Setting the minimum height

Max-height: Setting the maximum height

About the text

font-family: Microsoft ya black; Set Text font

font-size:16px; Set Text Size

Font-weight:bold; Set text Bold

Color: Set Text color

Font-style:italic Set Font to italic

Oblique setting text skew

Letter-spacing:2px|em Set Word Spacing

Line-height Setting Row Height

About the text

Text-indent: First Line Indent

Text-align: Left |right (right) |center (centered) on its way

text-shadow:2px 5px 1px #ccc Text Shadow the first represents a horizontal offset, the second parameter represents the vertical offset, the third parameter represents the blur amount, and the fourth parameter represents the shadow color

Text-decoration:overline (underline) |underline (underline) |line-through (strikethrough) |none (none)

text-decoration-color:red| #cccccc Set the color of a line

Text-decoration-style:dashed (dashed) |double (double line) |solid (solid line) |wavy (wavy line) |dotted (dotted line)

Text-decoration-position:

About the list

List-style:none to cancel a list style

List-style-image:url () modify list style as Picture

List-style-position:inside (inside) |outside (outside)

List-style-type:

About borders

BORDER:1PX solid #ccc The first parameter represents the size of the border, the second parameter represents the style of the border, and the third parameter represents the color of the border

The second parameter is desirable: solid (solid) |dashed (dashed) |dotted (dotted line) |double (double line) |groove (3D groove Contour) |ridge (3D convex groove contour) |inset (3D concave contour) |outset (3D convex edge profile)

Border-style:solid|dashed

Border-color: #cccccc

border-width:2px

BORDER-BOTTOM:1PX Solid #ccc Set the bottom border

BORDER-TOP:1PX solid #ccc Set top border

BORDER-LEFT:1PX Solid #ccc Set left border

BORDER-RIGHT:1PX Solid #ccc Set the right border

border-radius:2px 2px 3px 5px set rounded corners

Border-top-left-radius: Set upper left corner

Border-top-right-radius setting the upper right corner

Border-bottom-left-radius setting the lower left corner

Border-bottom-right-radius setting the lower right corner

Border-image:url () Set the border to a picture

Border-image-repeate:

Stretch: Specifies that the border background image is filled with a stretch.

Repeat: Specifies that the border background map is populated with tiling. When the picture touches the border, it is truncated if it is exceeded.

Round: Specifies that the border background map is populated with tiling. The picture dynamically adjusts the size of the picture according to the size of the border until it fills the entire border.

Space: Specifies a tiled way to fill the border background. The picture dynamically adjusts the spacing between the pictures according to the dimensions of the border until the entire border is exactly covered.

box-shadow:2px 5px 2px 20px inset

The first parameter is the horizontal offset, the second parameter is the vertical offset, the third parameter is the Blur setting, the fourth parameter extends the setting, the fifth parameter is omitted when the outer shadow is present, the inner shadow

About the background

Background:color|image setting background as color or picture

background-color:red| #0ff Setting the background color

Background-image:url () Set background picture

background-size:20px|20% 50px|30% Setting the background map size

Background-postion:left|right|center|bottom|top Background Image location

Left 20px

Insert multiple background images

Background-image:url (*.jpg) 0 0,url (*.jpg) 210px 40px

0 0 and 210px 40px represent the starting position coordinates of each background map


About fillers (padding, margins)

margin:1px up and down margins of 1px

margin:2px 4px up and down margin is 2px, left and right margin is 4px

margin:5px 10px 15px 20px Upper margin is 5px, right margin 10px, lower margin 15px, left margin 20px

The direction is upper right bottom left

margin-top:5px

margin-right:10px

margin-bottom:15px

margin-left:20px

Inner margin

PADDING:1PX the upper and lower left margin is 1px

PADDING:2PX 4px Upper and lower padding is 2px, the left and right padding is 4px

padding:5px 10px 15px 20px on the internal margin is 5px, right padding 10px, lower inner margin 15px, left inner margin 20px

The direction is upper right bottom left

padding-top:5px

padding-right:10px

padding-bottom:15px

padding-left:20px

About the layout

Display:block; Row to block or display

Display:none Hidden Space

opacity:0.5 Setting transparency

Filter:alpha (OPACITY=50) set transparency under IE

Overflow:hidden out-of-section hidden

Scroll display scroll bars

Auto displays scroll bars when content is out of the container

Overflow-x: Horizontal Beyond partially hidden

Overflow-y: Portrait out of partially hidden

Positioning

position:fixed; Fixed positioning

Position:absolute Absolute Positioning

Position:relative relative positioning

z-index:1-999 adjustment layer relationship, the greater the value the higher the priority display

Floating

Standard flow box considers non-standard flow box does not occupy space, non-standard flow box thinks standard flow box occupies space

Float:left left float

Float:right Right Float

Clear:both; Clear floating




CSS Properties-1

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.