Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the common CSS codes?

2025-04-07 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This "commonly used CSS code what are" article, the article example code introduction is very detailed, with a certain reference value, interested friends must refer to, for "what are commonly used CSS code", Xiaobian sorted out the following knowledge points, please follow the pace of the editor step by step slowly understand, then let us enter the topic.

one。 Text Settin

1. Font-size: font size parameter

2. Font-style: font format

3. Font-weight: font weight

4. Color attribute

Color: parameter

Pay attention to the use of web safe colors

II. Hyperlink settings

Text-decoration: parameter

The main purpose is to change the underline when the browser displays text links.

Value range of parameters:

Underline: underline text

Overline: underline text

Line-through: adding delete lines to text

Blink: make text blink

None: does not show any of the above effects

III. Background

1. Background color

Background-color: parameter

2. Background picture

Background-image:url (URL)

URL is the storage path of the background image, and none means none.

3. Repeat the background picture.

Background-repeat: parameter

Value range of parameters:

No-repeat: do not repeat the tile background image

Repeat-x: tile the picture horizontally only

Repeat-y: tile the picture vertically only

If you do not specify the background image repetition attribute, the browser default is that the background image is tiled horizontally and vertically.

4. The background picture is fixed

The background picture always controls whether the background picture scrolls as the page scrolls. If you do not set the fixed properties of the background image, the browser default background image scrolls as the page scrolls. In order to avoid overly gaudy background images that distract the viewer when scrolling, it is generally set to fixed.

Background-attachment: parameter

Value range of parameters:

Fixed: when a web page scrolls, the background image is fixed relative to the browser's window.

Scroll: when a web page scrolls, the background picture scrolls together relative to the browser's window.

IV. Block

1. Word spacing

Word-spacing: interval distanc

2. Letter spacing

Letter-spacing: letter spacin

3. Text alignment

Text-align: parameter

Value of the parameter:

Left: align to the left

Right: align to right

Center: Center alignment

Justify: relative to left and right alignment

4. Vertical alignment

Vertical-align: parameter

Top: top alignment

Bottom: bottom alignment

Text-top: relative to text top alignment

Text-bottom: align relative to the bottom of the text

Baseline: baseline alignment

Middle: Center alignment

Sub: display in the form of

Super: display in the form of the above

5. Text indentation

Text-indent: indent distanc

12px is equivalent to a text distance.

6. Spaces

White-space: parameter

Normal is normal.

Pre retention

Nowrap does not break lines.

7. Display style

Display: parameter

Value range of parameters:

Block: block-level element that wraps lines before and after the object

Inline: no line wrapping before and after the object

List-item: wraps lines before and after the object, adding bullets

None: no display

5. Box

1. Height height

2. Width width

3. Padding inner margin

4. Margin outer margin

5. Float (floating): you can arrange block-level elements in a row, such as horizontal menus.

6. Clear clears the float

VI. Frame

1. Style

Borderstyle parameter

Parameters of the border style:

None: no border

Dotted: the border is dotted

Dashed: the border is long and short lines

Solid: the border is solid

Double: the border is double Lin

2. Width

Borderwidth parameter

3. Color

Bordercolor parameter

7. List

List-style-type list style

The list characters in different browsers may be different and may affect the web page, so most of the lists in the web page are displayed by background pictures.

Controls the style of the user interface

8. Mouse

Cursor: mouse shape parameter

CSS Mouse shape parameters Table:

Mouse shape: CSS cod

Style= "cursor:hand" hand

Style= "cursor:crosshair" cross

Style= "cursor:text" text form

Style= "cursor:wait" hourglass shape

Style= "cursor:move" cross arrow:

Style= "cursor:help" question mark

Style= "cursor:e-resize" right arrow

Arrow shape on style= "cursor:n-resize"

Style= "cursor:nw-resize" upper left arrow

Style= "cursor:w-resize" left arrow

Arrow head shape under style= "cursor:s-resize"

Style= "cursor:se-resize" right down arrow

Style= "cursor:sw-resize" left down arrow

The above is all the contents of the article "what are the commonly used CSS codes?" Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report