A complete collection of web design css style codes, come and collect it!
奋力向前
Release: 2021-07-09 18:26:15
forward
20692 people have browsed it
Reduce a lot of unnecessary code, html css can easily layout the web page. Friends, keep it in your collection~
# 1. Text settings
1,
font-size: font size parameter
2,
font-style: font format
3,
font-weight: font thickness
4, color attribute
color: parameter
Pay attention to using web security colors
2. Hyperlink settings
text-decoration: 参数
Copy after login
The main purpose is Change the underline when the browser displays text links.
Parameter value range:
underline: underline the text
overline: underline the text
line-through: strikethrough the text
blink: use Text flashing
none: Do not display any of the above effects
3. Background
1. Background color
background-color: 参数
Copy after login
2. Background image
background-image: url(URL)
Copy after login
URL is the background The storage path of the image, none means none.
3. Background image repetition
background-repeat: 参数
Copy after login
Parameter value range:
no-repeat: Do not repeat the tiled background Picture
repeat-x: Make the picture tile only in the horizontal direction
repeat-y: Make the picture tile only in the vertical direction Paving
If you do not specify the background image repeat attribute, the browser defaults to the background image being tiled in both horizontal and vertical directions. 4. Background image fixed Background image fixed controls whether the background image scrolls with the scrolling of the web page. If you do not set the background image fixed attribute, the browser's default background image will scroll with the scrolling of the web page. In order to avoid overly fancy background images from diverting the viewer's attention when scrolling, they are generally set to fixed
background-attachment: 参数
Copy after login
Parameter value range:
fixed: Web page scrolling When the web page is scrolled, the background image remains fixed relative to the browser window
scroll: When the web page is scrolled, the background image scrolls together relative to the browser window
##4. Block 1. Word spacing
word-spacing: 间隔距离
Copy after login
2. Letter spacing
letter-spacing: 字母间距
Copy after login
3. Text alignment
text-align: 参数
Copy after login
Parameter value:
left: left alignment
right:right alignment
center:center alignment
justify:relative left and right alignment
4. Vertical alignment
vertical-align: Parameters
top:Top alignment
bottom: bottom alignment
text-top: relative text top alignment
text-bottom: relative text bottom alignment
baseline: Baseline alignment
middle: Center alignment
sub: Display in the form of subscript
super: Display in the form of superscript
5. Text indentation
text-indent: 缩进距离
Copy after login
12px is equivalent to a text distance of
6. Space
white-space: 参数
Copy after login
normal normal
pre reserved
nowrap no line break
7. Display style
display: 参数
Copy after login
Parameter value range:
block: block-level element, both before and after the object Line break
inline: No line breaks before and after the object
list-item: Line breaks before and after the object, increase Bullets
The above is the detailed content of A complete collection of web design css style codes, come and collect it!. For more information, please follow other related articles on the PHP Chinese website!
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn