当前位置:网站首页>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
边栏推荐
- Visitor mode
- 数据平台下的数据治理
- Synchronized and volatile
- 面向领域模型编程
- Short circuit effect of logical operators short circuit and short circuit or
- What is partition and barrel division?
- Xiaobai programmer's fifth day
- Xiaobai programmer's fourth day
- 【集训DAY13】Backpack【动态规划】【贪心】
- Wechat applet (anti shake, throttling), which solves the problem that users keep pulling down refresh requests or clicking buttons to submit information; Get the list information and refresh the data
猜你喜欢
随机推荐
Xiaobai programmer the next day
ThreadLocal summary (to be continued)
Ts:typera code fragment indentation display exception (resolved) -2022.7.24
3 词法分析
启牛商学院和微淼商学院哪个靠谱?老师推荐的开户安全吗?
Flex layout
Builder pattern
Internship: writing common tool classes
Synchronized and volatile
Matrix of C language
Xiaobai programmer's sixth day
Playwright tutorial (II) suitable for Xiaobai
SQL中in的用法 DQL 查询
SQL basic statement DQL select and extract DML insert delete
Interpretation of the source code of all logging systems in XXL job (line by line source code interpretation)
ThreadLocal 总结(未完待续)
3day
3dslicer import cone beam CT image
淦,为什么 '𠮷𠮷𠮷' .length !== 3 ??
torchvision









