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

边栏推荐
- 小白一键重装官网下载使用方法
- Visual studio 2022 interface beautification tutorial
- File upload vulnerability shooting range upload labs learning (pass1-pass5)
- buuctf(pwn)
- MySQL prevents Chinese garbled code and solves the problem of Chinese garbled code
- Successfully solved: selenium common. exceptions. TimeoutException: Message: timeout: Timed out receiving message from
- The solution of wechat applet switchtab unable to take parameters
- Chapter IX app project test (2) test tools
- Kotlin compose listens to the soft keyboard and clicks enter to submit the event
- dotnet-exec 0.4.0 released
猜你喜欢

OLAP analysis engine kylin4.0

CSRF (Cross Site Request Forgery) &ssrf (server request forgery) (IV)

在 .NET 6 中使用 dotnet format 格式化代码
![[image fusion] image fusion based on MATLAB directional discrete cosine transform and principal component analysis [including Matlab source code 1907]](/img/a1/f7a35a04e180e89d7f2fdbf89c1160.jpg)
[image fusion] image fusion based on MATLAB directional discrete cosine transform and principal component analysis [including Matlab source code 1907]

dotnet-exec 0.4.0 released

Kotlin compose perfect todo project surface rendering background and shadow

What if the desktop computer is not connected to WiFi

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

Vscade setting clang format

Working principle of asemi three-phase rectifier bridge
随机推荐
Google Earth Engine(GEE)——全球JRC/GSW1_1/YearlyHistory数据集的批量下载(中国区域)
EL & JSTL (XIII)
The construction and usage of wampserver framework
parallel recovery slave next change & parallel recovery push change
Ctfhub eggs
Php7.2 add JPEG extension
Summary of SQL injection (I)
OpenSea PHP开发包
TeeChart Pro ActiveX 2022.1
Startup mode of SoC verification environment
How to apply for software
成功解决:selenium.common.exceptions.TimeoutException: Message: timeout: Timed out receiving message from
The consciousness of a programmer
Web3 DAPP user experience best practices
Compatible with Internet Explorer
Database query optimization method
Upgrade PHP to php7 The impact of X (2), the obsolescence of mcrypt decryption
Student achievement management system based on SSH
Qdebug June 2022
Kotlin Compose 监听软键盘 点击enter提交事件