Summary of Common Terms in CSS (Cascading Style Sheet)

Summary of Common Terms in CSS (Cascading Style Sheet)
If you use CSS don't forget to write DOCTYPE, document type definition.
Standard box model

1. Element classification <br />Block-level elements (block)
Div+css (DIV and CSS are both containers)
<p> is a paragraph tag, a block-level element.
Inline elements
Span does not respond to box model properties.
2. Standard flow <br />The arrangement of labels.
3. Box model <br />Put the element into the box with a margin of 4 (take the maximum value when two are together, do not add the sum)
Padding 4 content areas (width and height)
Border 4
Styles can be written together.
4. Float <br />Depart from the standard flow.
5. Positioning <br />Absolute: absolute deviates from the standard flow and is absolute to the box that contains the element.
Relative: relative to the original position but not out of the standard flow
6. Setting the hyperlink style
a:link is the initial state of the hyperlink
a:hover is the state of hovering when the mouse is placed on it
a:active is when the mouse is clicked
a: visited is the situation after visiting
7. CSS hack (For more information about CSS hack, please visit: http://baike.baidu.com/view/1119452.htm)
*margin-top:10px!important; /*Only IE678 recognizes this rule*/
_margin is only recognized by IE6.
Other core browsers can recognize!Important (increase priority)
Solve the IE gap problem: Margin-top: -2em Make the outer border two e units upward
8. These three attributes must be present when loading the cut image
background-image
background-position
background-repeat: /*no repeat*/
9. * Space represents the settings for all elements

<<:  Implementation of Element-ui Layout (Row and Col components)

>>:  Add ?v= version number after js or css to prevent browser caching

Recommend

RHCE installs Apache and accesses IP with a browser

1. at is configured to write "This is a at t...

Detailed explanation of how to install PHP7 on Linux

How to install PHP7 on Linux? 1. Install dependen...

Vue2.0 implements adaptive resolution

This article shares the specific code of Vue2.0 t...

Pure HTML+CSS to achieve Element loading effect

This is the effect of the Element UI loading comp...

Sharing some details about MySQL indexes

A few days ago, a colleague asked me a question a...

How to modify the root password of mysql in docker

The first step is to create a mysql container doc...

New settings for text and fonts in CSS3

Text Shadow text-shadow: horizontal offset vertic...

Docker MQTT installation and use tutorial

Introduction to MQTT MQTT (Message Queuing Teleme...

This article takes you into the world of js data types and data structures

Table of contents 1. What is dynamic typing? 2. D...

Linux editing start, stop and restart springboot jar package script example

Preface In the springboot configuration file, the...

MYSQL 5.6 Deployment and monitoring of slave replication

MYSQL 5.6 Deployment and monitoring of slave repl...

How to customize an EventEmitter in node.js

Table of contents Preface 1. What is 2. How to us...

What are the differences between xHTML and HTML tags?

All tags must be lowercase In XHTML, all tags must...

Implementation of MySQL multi-version concurrency control MVCC

Transaction isolation level settings set global t...