CSS Common Code Daquan, HTML CSS Code

html+css can facilitate the layout of web pages and reduce a lot of unnecessary code. 1. Text setting 1. font-size: font size parameter 2. font-style: font format 3. font-weight: font thickness 4. color attribute color: parameter Note to use web-safe color 2. Hyperlink setting text-decoration: parameter The main purpose is to 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: flash the text none: do not display any of the above effects 3. Background 1, background color background-color : Parameter 2. Background image background-image: url(URL)    URL is the storage path of the background image, none means none. 3. Background image repeat background-repeat: Parameter value range:      no-repeat: Do not repeat tile background image repeat-x: Make the image only tile in the horizontal direction repeat-y: Make the image only tile in the vertical direction If you do not specify the background image repeat attribute, the browser defaults to tile the background image in both horizontal and vertical directions.    4, background picture fixed      background picture fixed control whether the background picture scrolls with the scroll of the webpage. If you do not set the background image fixed attribute, the browser defaults the background image to scroll with the scrolling of the web page. In order to avoid too fancy background images to divert the viewer’s attention when scrolling, it is generally set to a fixed background-attachment: http://zzdxjyzd.com Parameter value range:      fixed: When the web page is scrolled, the background image is relative to the browser In terms of the browser window, fixed scroll: When the web page is scrolled, the background image will scroll together with respect to the browser window. Four blocks 1, word spacing word-spacing: spacing distance 2, letter spacing letter-spacing: Letter spacing 3. Text alignment text-align: parameter value:     left: left align rig

Leave a Comment

Your email address will not be published.