当前位置:网站首页>Document flow definition, box model related knowledge
Document flow definition, box model related knowledge
2022-07-25 22:27:00 【Start】
1. What is document flow
The document flow (normal flow)
The web page is a multi-layered structure , Set style style , It is also a layer by layer setting , Finally, we see the top layer
Document flow is the bottom layer of web pages
The elements we create are by default , All in the document stream
Elements are divided into two states : In the document stream , Off stream
The characteristics of elements in document flow
A block element
1: It's going to monopolize a line
2: The width of the block element is by default the width of the parent element 100%
3: By default, the height of the block element is extended by the content
Inline elements ( Inline elements )
1: Don't monopolize a line
2: Width and height are supported by content by default , You can't define the width and height by yourself
Inline block element
1、 Width and height can be set
2、 And won't monopolize one line
After the element leaves the document stream , No longer distinguish between block elements , Inline elements , It doesn't have the characteristics of elements in the document flow
Elements that break away from the document flow will be more similar to inline block elements
2. Box model
Think of elements as boxes , rectangular px Can be positive or negative
Box model , Frame model , The box model (box model)
Content area content -- The refrigerator
padding padding -- plastic
Frame border -- The box
Margin margin -- Express distance ( irrelevant , The box has no effect )
1:border-width The default value is usually 3px
Use border-width You can specify the width of each of the four borders
Can be followed by multiple values
4 It's worth On Right Next Left
3 It's worth On about Next
2 It's worth Up and down about
1 It's worth The up and down or so
except border-width,CSS There are also four border-xxx-width
xxx The value of may be top right bottom left
It is specially used to set the width of the specified edge
2:border-color Set the color of the border The default value is black
It's the same width ,color It also provides styles in four directions , Colors can be specified separately
border-xxx-color
3:border-style Style the border
Optional value :
none, The default value is , No borders
solid Solid line
double double
dashed [dæʃt] Dotted line
dotted ['dɔtid] Dot border
style You can also specify the border styles of the four sides respectively , Rules and width Agreement ,
It also provides border-xxx-style Four styles , To set four sides respectively
border
- Abbreviated style of border , Through it, you can set the style of four borders at the same time , Width , Color
- And there is no order requirement
- border One designation is to designate four edges at the same time, and cannot be designated separately
border-top border-right border-bottom border-left
You can set the style of four edges separately , Rules and border equally , It only works on one side
边栏推荐
- Perform Jieba word segmentation on the required content and output EXCEL documents according to word frequency
- Build commercial projects based on ruoyi framework
- 【PMP学习笔记】第1章 PMP体系引论
- 6-17 vulnerability exploitation - deserialization remote command execution vulnerability
- 【Leetcode】502.IPO(困难)
- internship:普通常用的工具类编写
- Flex layout
- 启牛商学院和微淼商学院哪个靠谱?老师推荐的开户安全吗?
- 【数据库学习】Redis 解析器&&单线程&&模型
- D3.js learning
猜你喜欢

Compile and decompile

QML module not found

Ts:typera code fragment indentation display exception (resolved) -2022.7.24

H5 lucky scratch lottery free official account + direct operation

ThreadLocal 总结(未完待续)

【集训DAY11】Calc【数学】

Selenium basic use and use selenium to capture the recruitment information of a website (continuously updating)

PySpark数据分析基础:pyspark.sql.SparkSession类方法详解及操作+代码展示

The third day of Xiaobai programmer

【集训DAY15】简单计算【树状数组】【数学】
随机推荐
【集训DAY13】Out race【数学】【动态规划】
Five constraints and three paradigms
H5 lucky scratch lottery free official account + direct operation
IFLYTEK smart office book air e-book reader makes my work life healthier
Don't vote, software testing posts are saturated
Leetcode 106. construct binary tree from middle order and post order traversal sequence
【集训DAY15】Boring【树形DP】
分割金条的代价
Use of hyperlinks
3day
About vscode usage+ Solutions to the problem of tab failure
How to resolve a domain name to multiple IP addresses?
Call of addition, subtraction, multiplication and division of integer type only
【集训DAY15】简单计算【树状数组】【数学】
Xiaobai programmer's first day
数据平台下的数据治理
ML-Numpy
谷歌分析UA怎么转最新版GA4最方便
Builder pattern
【C语法】void*浅说