当前位置:网站首页>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 ;

边栏推荐
- ASEMI大功率场效应管和三极管的区别
- Leader: who can use redis expired monitoring to close orders and get out of here!
- Chapter IX app project test (2) test tools
- Database overview
- JS, BOM, DOM (VI)
- 2021-03-23
- Huawei Hongmeng development lesson 4
- The SQL response is slow. What are your troubleshooting ideas?
- Kotlin compose listens to the soft keyboard and clicks enter to submit the event
- CTFHub-rce
猜你喜欢

What if win11 Bluetooth fails to connect? Solution of win11 Bluetooth unable to connect

Teach you to write non maintainable PHP code step by step

Method of opening data recovery of solid state disk

buuctf web

Kotlin Compose 完善toDo项目 Surface 渲染背景 与阴影

固态硬盘开盘数据恢复的方法

ThinkPHP 5 log management

Specific operations for uploading pictures in PHP

TeeChart Pro ActiveX 2022.1

How to open the DWG file of the computer
随机推荐
Two hours to take you into the software testing industry (with a full set of software testing learning routes)
Qdebug June 2022
OOP stack class template (template +ds)
Opensea PHP development kit
ORA-00800: soft external error
固态硬盘开盘数据恢复的方法
Wechat likes to pay attention to the solution of invalid automatic reply
【Flink】RocksDB增量模式checkpoint大小持续增长的问题及解决
融合CDN,为客户打造极致服务体验!
OOP vector addition and subtraction (friend + copy construction)
MySQL prevents Chinese garbled code and solves the problem of Chinese garbled code
Mobile number regular expression input box loses focus verification
OLAP analysis engine kylin4.0
great! Auto like, I use pyautogui!
2021-03-23
Customize the console plot result style
两小时带你进入软件测试行业风口(附全套软件测试学习路线)
How to open the DWG file of the computer
2021-04-02
成功解决:selenium.common.exceptions.TimeoutException: Message: timeout: Timed out receiving message from