当前位置:网站首页>行内元素、块元素、行内块元素
行内元素、块元素、行内块元素
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;
边栏推荐
- 选择器(>,~,+,[])
- L2tp/ipsec one click installation script
- [从零开始学习FPGA编程-41]:视野篇 - 摩尔时代与摩尔定律以及后摩尔时代的到来
- [image segmentation] retinal vessel segmentation based on morphology with matlab code
- pair类备注
- [equalizer] bit error rate performance comparison simulation of LS equalizer, def equalizer and LMMSE equalizer
- How to connect the Bluetooth headset to the computer and how to connect the win10 computer to the Bluetooth headset
- 爬虫基础B1——Scrapy(B站学习笔记)
- Only two lines are displayed, and the excess part is displayed with Ellipsis
- What should I pay attention to after the live broadcast system source code is set up?
猜你喜欢
![[OGeek2019]babyrop](/img/74/5f93dcee9ea5a562a7fba5c17aab76.png)
[OGeek2019]babyrop
![buuctf misc [UTCTF2020]docx](/img/e4/e160f704d6aa754e85056840e14bd2.png)
buuctf misc [UTCTF2020]docx

希尔伯特-黄变换

How can win11 set the CPU performance to be fully turned on? How does win11cpu set high performance mode?

Blue Bridge Cup seven segment code (dfs/ shape pressing + parallel search)
![[wustctf2020] climb](/img/b6/4a0582144c3125e7a0666bbbbfe29d.png)
[wustctf2020] climb

【NILM】非入侵式负荷分解模块nilmtk安装教程

【008】表格数据逐行筛选,跳出for循环及跳过本次循环思路_#VBA

2022年PMP项目管理考试敏捷知识点(1)

Only two lines are displayed, and the excess part is displayed with Ellipsis
随机推荐
Global and Chinese market of water massage column 2022-2028: Research Report on technology, participants, trends, market size and share
Étalonnage de la caméra (objectif et principe d'étalonnage)
Global and Chinese market of digital fryer 2022-2028: Research Report on technology, participants, trends, market size and share
Dichotomous special training
只显示两行,超出部分省略号显示
When MFC uses the console, the project path cannot have spaces or Chinese, otherwise an error will be reported. Lnk1342 fails to save the backup copy of the binary file to be edited, etc
Buuctf misc grab from the doll
Deploy L2TP in VPN (Part 2)
bjdctf_2020_babystack
bjdctf_ 2020_ babystack
后疫情时代下,家庭服务机器人行业才刚启航
[从零开始学习FPGA编程-41]:视野篇 - 摩尔时代与摩尔定律以及后摩尔时代的到来
图形技术之坐标转换
Only two lines are displayed, and the excess part is displayed with Ellipsis
【Django中运行scrapy框架,并将数据存入数据库】
10 common malware detection and analysis platforms
光照使用的简单总结
LeetCode 207:课程表(拓扑排序判断是否成环)
Analog display of the module taking software verifies the correctness of the module taking data, and reversely converts the bin file of the lattice array to display
Deploy L2TP in VPN (Part 1)