当前位置:网站首页>行内元素、块元素、行内块元素
行内元素、块元素、行内块元素
2022-06-24 06:46:00 【渣渣淘】
行内元素、块元素、行内块元素
一、行内元素
特点:
1.相邻行内元素在一行上,一行可以显示多个
2.高、宽、直接设置是无效的
3.默认宽度就是它本身内容的宽度
4.行内元素只能容纳文本或其他行内元素
注:特殊情况下< a> 里面可以放块级元素,给< a>转换为块级元素最安全
常见行内元素:< a> < strong> < b> < em> < i> < del> < s> < ins> < u> < span>等
二、块元素
特点:
1.自己独占一行
2.高度、宽度、外边距以及内边距都可以控制
3.宽度默认是容器(父元素)宽度的100%
4.是一个容器及盒子,里面可以放行内元素或块元素
注:文本类的元素内不能放块级元素,如< p>主要用于放文字,因此不能放块级元素,特别是< div>
常见块级元素:< div> < p> < ul> < li> < h1>···< h6>
三、行内块元素
特点:
1.和相邻行内元素(行内块元素)在一行上。但是它们之间会有空白缝隙。一行可以显示多个(行内元素特点)
2.默认宽度就是它本身内容宽度(行内元素特点)
3.高度,行高,外边距以及内边距都可以控制(块级元素特点)
常见行内块元素:< img/> < input> < td>
四、元素显示显示转换
转换为块元素:display: block;
转换为行内元素:display: inline;
转换为行内块元素:display: inline-block;
边栏推荐
- Global and Chinese market of water massage column 2022-2028: Research Report on technology, participants, trends, market size and share
- Combine with (& &) logic or (||), dynamic binding and ternary operation
- Global and Chinese market of Earl Grey tea 2022-2028: Research Report on technology, participants, trends, market size and share
- L2tp/ipsec one click installation script
- Win10 build webservice
- Alibaba cloud full link data governance
- [signal recognition] signal modulation classification based on deep learning CNN with matlab code
- get_ started_ 3dsctf_ two thousand and sixteen
- Counter attack from outsourcing to big factories! Android has been developed for 5 years, and after a year of dormancy, it has tried to become an offer harvester. Tencent has a fixed salary of 20*15
- Unity 的序列化
猜你喜欢
![[image segmentation] retinal vessel segmentation based on morphology with matlab code](/img/e3/0805df81a597346ea7c2d2da20ac96.png)
[image segmentation] retinal vessel segmentation based on morphology with matlab code

RDD的执行原理
![LeetCode 515 在每个数行中找最大值[BFS 二叉树] HERODING的LeetCode之路](/img/16/011ba3aef1315c39526daac7e3ec89.png)
LeetCode 515 在每个数行中找最大值[BFS 二叉树] HERODING的LeetCode之路

RDD basic knowledge points
![[image fusion] image fusion based on directional discrete cosine transform and principal component analysis with matlab code](/img/21/a5a973f06ea002755a8a2a4431dcd8.png)
[image fusion] image fusion based on directional discrete cosine transform and principal component analysis with matlab code

bjdctf_2020_babystack

Shader 常用函数

How can win11 set the CPU performance to be fully turned on? How does win11cpu set high performance mode?
![[tips] use the deep learning toolbox of MATLAB deepnetworkdesigner to quickly design](/img/74/f615191715a9ac58a8546f8d1e8f8d.png)
[tips] use the deep learning toolbox of MATLAB deepnetworkdesigner to quickly design
![[GUET-CTF2019]zips](/img/79/22ff5d4a3cdc3fa9e0957ccc9bad4b.png)
[GUET-CTF2019]zips
随机推荐
图形技术之坐标转换
Bjdctf 2020 Bar _ Babystack
[learn FPGA programming from scratch -42]: Vision - technological evolution of chip design in the "post Moorish era" - 1 - current situation
Climbing 10000 NASA pictures about Mars exploration, I found a secret
Quickly set up PgSQL for serverless
LeetCode 515 在每个数行中找最大值[BFS 二叉树] HERODING的LeetCode之路
[image fusion] image fusion based on pseudo Wigner distribution (PWD) with matlab code
Deploy L2TP in VPN (medium)
Global and Chinese market of Earl Grey tea 2022-2028: Research Report on technology, participants, trends, market size and share
Anaconda 中使用 You Get
What industries and scenarios can the easynvr/easygbs/easycvr platform developed by tsingsee green rhino video be used in?
C# Lambda
A case of bouncing around the system firewall
智能指针备注
jarvisoj_ level2
[mrctf2020] thousand layer routine
【Vulhub靶场】】zabbix-SQL注入(CVE-2016-10134)漏洞复现
Tencent cloud security and privacy computing has passed the evaluation of the ICT Institute and obtained national recognition
Accessing user interface settings using systemparametersinfo
Common coding and encryption in penetration testing