当前位置:网站首页>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 ”
边栏推荐
- ClickHouse学习(七)表查询优化
- 2022 mathematical modeling competition summer training lecture - optimization method: goal planning
- 【TypeScript】TypeScript中类型缩小(含类型保护)与类型谓词
- 常见特征工程操作
- Day 1
- uniapp页面标题显示效果
- 用sql-client.sh生成的job在cancle过后 如何实现断点续传?
- Day 2
- Detailed explanation of typical application code of C language array - master enters by mistake (step-by-step code explanation)
- ClickHouse学习(一)ClickHouse?
猜你喜欢
随机推荐
C language first level pointer
ClickHouse学习(十)监控运行指标
Hcia-r & s self use notes (26) PPP
Day 5
Qtcreator+cmake compiler settings
Clickhouse learning (XI) clickhouseapi operation
Wechat applet video upload component is directly uploaded to Alibaba cloud OSS
On Paradigm
【无标题】
ClickHouse学习(三)表引擎
第一周总结
Application of Huffman tree and Huffman coding in file compression
Basic use of redis
[C language series] - detailed explanation of file operation (Part 1)
redis的基本使用
uniapp页面标题显示效果
【TypeScript】TypeScript中类型缩小(含类型保护)与类型谓词
·Let's introduce ourselves to the way of programming·
Pyqt5: Chapter 1, Section 1: creating a user interface using QT components - Introduction
Cmu15-213 shell lab experiment record







![[electronic circuit] how to select ADC chip](/img/41/05153704986117ce9adaa09cb71a7a.png)

