DIV CSS commonly used attributes, parameters and descriptions_Experience exchange

WBOY
Release: 2016-05-16 12:04:39
Original
1657 people have browsed it

General class
overflow:hidden; automatically hides excess content to prevent expanding the scope of layers and tables
!important
Specifies the application priority of style rules
Text class color: #FF0000;Text color font-family: "Arial", "Helvetica", "sans-serif"; font-size: 9px; font size text-align: center; center (left means left, right means right) line-height: 28px; High (available 150% value) font-style: italic; italic (oblique slant) font-weight: bold; service bold (bolder extra bold, 400 bold value) font-variant: small-caps; small caps text- transform: capitalize; text-decoration: underline overline line-through blink; underline, overline, strikethrough, blink text-indent: 2em; text indent 2 font height (or 15px, that is, 15 pixels)
Background class background-attachment: fixed; fixed position (scroll) background: #0066CC; background color (transparent) background: url(/image/more2.gif); background image background-repeat: repeat; repeat ( repeat-x repeats horizontally, repeat-y repeats vertically) background-position: center top; horizontal center vertical top (left center horizontal center left vertical center) background: url(/image/dtbg.gif) #FEFEFE
no-repeat
Right bottom (2px 5px);
Background image,
Background color, the image does not repeat, the background image starts from the lower right corner (the image is 2px from the left and 5px from the top)
Frame position class
clear: both; reject floating objects on both sides (left rejects floating objects, right rejects floating objects)
float: left; floating objects are positioned on the left (right, the latest train schedule is on the right)
position :relative; Relative position, usually set the best timetable in the superior frame
Position: absolute; Absolute position, set the top and left values ​​​​for this level frame in conjunction with the settings of the superior frame
top: 5px; Absolute position of the page or relative to the top of the frame
Left: 10px; Absolute position of the page absolute or relative to the left side of the frame
Width: 100px; 100px wide
Height: 200px; 200px high (auto and 100% values ​​available) )
Margin Shanghai train timetable: 10px 20px 10px 20px;
Top, right, bottom and left margins (if the values ​​are the same, margin: 10px can be omitted)
Specify margin-top separately: 10px; (margin- right, margin-bottom, margin-left)
Padding: 20px 10px 10px 20p;
The distance between the top, right, bottom and left content from the border (the same value can omit padding: 10px)
Use padding- when specified individually top: 10px; (padding-right, padding-bottompadding-left)
Border: #ccc 1px solid Chengdu train timetable;
Four border colors, line width, solid lines (dotted dashed line, dashed dotted line, double Double line, ridge (ridge)
Separately specify border-top: #ccc 1px solid; border-right: #ccc 1px solid
Wait
Item list class list-style-position: outside; position For outside (inside) list-style-image: url(/yh/image/more04.gif); bullet image Linke timetable list-style-type: disc; bullets are dots (circle circle, square)
Extended class cursor: e-resize; mouse style filter: Blur(Add=4 , Direction=8, Strength=4); filter filter: FlipH; horizontal flip (FlipV gprs traffic fee vertical flip)
Set the link separately
#bottool a:link{color:#fff}; Unvisited Color
 #bottool a:visited{color:#fff};Visited color flow software
 #bottool a:hover{color:#ff0};The mouse is on the link
There are so many definition items, in fact Commonly used are the following categories: specify width and height value width, height; specify background: background; specify position: float, specially use position combined with top and left to position; set frame margin: margin; set inner frame distance of container : Padding several items. Among them, the definition items of overflow, clear, and !important programs were canceled in my style definition. 1. Cancel overflow:hidden because after repeated experiments, this definition item can only hide content that exceeds the height of the container but cannot hide content that exceeds the width. What I need is to be able to automatically hide content that exceeds the width of the container. Sometimes I need the height of the container to expand according to the amount of content. 2. The reason for canceling the clear definition is that in actual applications, the arrangement relationship between containers is truly understood. The position of the frame or container is still accurately positioned using float, position, top, left, etc. 3. !important
Specifies the application priority of style rules. This is mainly used to distinguish the display effect between IE and other browsers. My website just wants to fix the display effect, so there is no priority.
I am still researching DIV CSS. If there are any inappropriate points, please post and correct them. If there are any improvements, please post them and improve them. I think the most important thing when using DIV CSS to layout a website is the layout idea. Different design plans have very different traditional and simplified designs. I focus on the universality of the framework or container, and design several container styles, just like the label style in FS4, and then just call this style where needed to achieve universality rather than specificity. Let’s talk about these today, and we will talk specifically about this layout design idea later.

Related labels:
source:php.cn
Statement of this 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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template