


DIV CSS commonly used attributes, parameters and descriptions_Experience exchange
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.

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Using Bootstrap in Vue.js is divided into five steps: Install Bootstrap. Import Bootstrap in main.js. Use the Bootstrap component directly in the template. Optional: Custom style. Optional: Use plug-ins.

HTML defines the web structure, CSS is responsible for style and layout, and JavaScript gives dynamic interaction. The three perform their duties in web development and jointly build a colorful website.

WebdevelopmentreliesonHTML,CSS,andJavaScript:1)HTMLstructurescontent,2)CSSstylesit,and3)JavaScriptaddsinteractivity,formingthebasisofmodernwebexperiences.

To set up the Bootstrap framework, you need to follow these steps: 1. Reference the Bootstrap file via CDN; 2. Download and host the file on your own server; 3. Include the Bootstrap file in HTML; 4. Compile Sass/Less as needed; 5. Import a custom file (optional). Once setup is complete, you can use Bootstrap's grid systems, components, and styles to create responsive websites and applications.

There are two ways to create a Bootstrap split line: using the tag, which creates a horizontal split line. Use the CSS border property to create custom style split lines.

There are several ways to insert images in Bootstrap: insert images directly, using the HTML img tag. With the Bootstrap image component, you can provide responsive images and more styles. Set the image size, use the img-fluid class to make the image adaptable. Set the border, using the img-bordered class. Set the rounded corners and use the img-rounded class. Set the shadow, use the shadow class. Resize and position the image, using CSS style. Using the background image, use the background-image CSS property.

How to use the Bootstrap button? Introduce Bootstrap CSS to create button elements and add Bootstrap button class to add button text

To adjust the size of elements in Bootstrap, you can use the dimension class, which includes: adjusting width: .col-, .w-, .mw-adjust height: .h-, .min-h-, .max-h-
