当前位置:网站首页>Notes on non replacement elements in the line (padding, margin, and border)
Notes on non replacement elements in the line (padding, margin, and border)
2022-06-25 05:00:00 【MomentYY】
Catalog
Notes on non replacement elements in the line (padding、margin and border)
1. The following attributes do not take effect for inline non replacement elements
- width and height;
- margin-top and margin-bottom( about margin It can take effect normally );
2. The following attributes have a special effect on inline non replacement elements
padding-top and padding-bottom( about padding It can take effect normally );
Sample code :
span { padding-top: 8px; padding-bottom: 8px; background-color: red; }<div> On div</div> <span>span1</span> <span>span2</span> <div> Next div</div>Running results :span Set up and down padding yes Do not occupy space Of , So it will extend to the upper and lower elements ;

Up and down border( about border It can take effect normally );
Sample code :
span { border-top: 8px solid green; border-bottom: 8px solid green; background-color: red; }<div> On div</div> <span>span1</span> <span>span2</span> <div> Next div</div>Running results :span Set up and down border yes Do not occupy space Of , So it will extend to the upper and lower elements ;

边栏推荐
- Why is the TCP handshake just 3 times?
- 《QDebug 2022年6月》
- XSS (cross site script attack) summary (II)
- 小白一键重装官网下载使用方法
- 【FLink】access closed classloader classloader. check-leaked-classloader
- Redis (17)
- Attack and defense world web baby Web
- How do the defi protocols perform under this round of stress test?
- Write shell script error summary
- EL & JSTL (XIII)
猜你喜欢

CSRF (Cross Site Request Forgery) &ssrf (server request forgery) (IV)
Triangle class (construction and deconstruction)

Region of Halcon: generation of multiple regions (3)

基于SSH实现的学生成绩管理系统

Activereportsjs V3.0 comes on stage

EL & JSTL (XIII)

How to use the Magic pig system reinstallation master

The solution of wechat applet switchtab unable to take parameters

Startup mode of SoC verification environment

Difference between asemi high power FET and triode
随机推荐
Construction scheme of distributed websocket
WPF uses Maui's self drawing logic
Matlab notes
The solution of wechat applet switchtab unable to take parameters
How to download and use Xiaobai one click reload on the official website
OOP vector addition and subtraction (friend + copy construction)
ASEMI三相整流桥的工作原理
CTFHub-rce
Heavy broadcast | phase shift method + mathematical principle derivation of multi frequency heterodyne + implementation
Wechat applet new version prompt update
What if win11 Bluetooth fails to connect? Solution of win11 Bluetooth unable to connect
Redis (17)
Leader: who can use redis expired monitoring to close orders and get out of here!
初识 Flutter 的绘图组件 — CustomPaint
How micro engine uploads remote attachments
Specific operations for uploading pictures in PHP
ORA-00800: soft external error
Why is the TCP handshake just 3 times?
Wechat likes to pay attention to the solution of invalid automatic reply
CSRF (Cross Site Request Forgery) &ssrf (server request forgery) (IV)