当前位置:网站首页>Relative positioning and absolute positioning
Relative positioning and absolute positioning
2022-07-29 05:40:00 【Try your best】
Relative positioning and absolute positioning
In addition to based on “ The document flow ” The positioning of ,CSS Other positioning methods of labels are also defined ,CSS Use position Property specifies how the label is positioned
position Value
static, The default value is , That is, based on “ The document flow ” The positioning of
relative, Relative positioning , That is to say “ The document flow ” On the basis of , combination left and top attribute , Relative positioning
absolute, Absolute positioning , I.e. disengagement “ The document flow ”, And based on its “ Include box ”, Use left and top Property to locate
fixed, Fixed position , That is, special absolute positioning , That is, its “ Include box ” For browsers
position:relative;( Relative positioning )
Be careful :
Relative to the original position , Use left,right Offset
The location of the original position for subsequent elements (float) Is still valid
For the use of float The elements of ,realative It also works
position:absolute;( Absolute positioning )
Be careful :
Absolute positioning is off ” The document flow “,
When using absolute positioning , Pay attention to alignment ” Include box “, Include this tag , And the one closest to it ,position It's not equal to static The label of
without , Then it will be located based on the upper left corner of the browser
special
Define only position:absolute; No settings left and top, The label position is still installed “ The document flow ” location , But already “ Off stream ”
边栏推荐
- Day 5
- paddle.fluild常量计算报错‘NoneType‘ object has no attribute ‘get_fetch_list‘
- [C language series] - storage of deep anatomical data in memory (II) - floating point type
- 字符类型转换
- Clickhouse learning (IX) Clickhouse integrating MySQL
- Integer overflow and printing
- Allocate memory: malloc() and free()
- 弹性盒子相关知识
- JS deep copy - Notes
- 移动端-flex项目属性
猜你喜欢

·来一篇编程之路的自我介绍吧·

Day 2

【C语言系列】— 把同学弄糊涂的 “常量” 与 “变量”

【C语言系列】— 字符串+部分转义字符详解+注释小技巧

【JS题解】牛客网JS篇1-10题
![[electronic circuit] how to select ADC chip](/img/41/05153704986117ce9adaa09cb71a7a.png)
[electronic circuit] how to select ADC chip

公众号不支持markdown格式文件编写怎么办?

Together with digital people, digital space and XR platform, Alibaba cloud and its partners jointly build a "new vision"

力扣994:腐烂的橘子(BFS)

Hcia-r & s self use notes (27) comprehensive experiment
随机推荐
Clickhouse learning (VI) grammar optimization
公众号不支持markdown格式文件编写怎么办?
About local variables
JS simple code determines whether the device that opens the page is the PC end of the computer, the H5 end of the mobile phone, or the wechat end
Li Kou 994: rotten orange (BFS)
Basic use of redis
Application of Huffman tree and Huffman coding in file compression
[C language series] - three methods to simulate the implementation of strlen library functions
·来一篇编程之路的自我介绍吧·
Clickhouse learning (VIII) materialized view
第一周总结
【TypeScript】TypeScript中类型缩小(含类型保护)与类型谓词
Storage category
[sword finger offer] - explain the library function ATOI and simulate the realization of ATOI function
Global components component registration
Basic concepts of MySQL + database system structure + extended application + basic command learning
弹性盒子flex
ClickHouse学习(三)表引擎
Detailed installation and use tutorial of MySQL (nanny installation with pictures and texts)
Do students in the science class really understand the future career planning?