当前位置:网站首页>Element display mode: block level, inline, inline block, nesting specification, display mode conversion
Element display mode: block level, inline, inline block, nesting specification, display mode conversion
2022-07-27 08:23:00 【Gru 977】
Chrome In debugging mode, there are Computed You can view the display mode of elements .
1. Block-level elements ( Can be alone )block
Monopolize one line
Width : Parent element width ( Default )
Height : Open up by content ( Default )
Width and height can be set
eg:
hx(x=1~6),div , p , ul li , dl dt dd , form , header , nav , footer
2. Inline elements ( Don't do more )inline
One line shows more , Don't wrap
The width is spread by the content
Width and height cannot be set
( horizontal direction )padding and margin You can set
eg:
a , span ,b , u , i , s , strong , ins , em ,del
3. Inline block element ( Multi line inner block )inline-block
More than one in a row ( There is a gap in the middle )
Width and height can be set
eg:
input , textarea , button ,select
img It has the characteristics of inline block elements , however Chrome Is shown as inline
HTML Nested specification :
Block-level elements : Big container , Can be nested : Text , Block level , inline , Inline block element
but p Cannot nest div,p,h
Inline elements : Can be nested : Text , Inline elements
a Any element can be nested inside the label , Except myself
Element display mode conversion
block -> inline :display: inline;
inline -> block :display:block; ( Commonly used )
block , Inline elements -> Block in row :display:inline-block; ( Commonly used )
边栏推荐
- 阿里云国际版回执消息简介与配置流程
- Vcenter7.0 installation of ibm3650m4 physical machine
- 1176 questions of Olympiad in informatics -- who ranked K in the exam
- All in one 1319 - queue for water
- Dormitory access control system made by imitating the boss (III)
- 如何卸载--奇安信安全终端管理系统
- How to uninstall -- Qianxin secure terminal management system
- arguments
- QT creator code style plug-in beautifier
- 借生态力量,openGauss突破性能瓶颈
猜你喜欢
随机推荐
Flutter 渲染机制——GPU线程渲染
Prevent cookies from modifying ID to cheat login
STM32小bug汇总
第2章 前台数据展现
Local Oracle reported ora-12514: tns: the listener cannot recognize the requested service at present
Opengauss stopped from the library and found that the main library could not write data
[netding cup 2020 rosefinch group]nmap 1 two solutions
docker 安装mysql后进入容器内部发现登录不了mysql
IBM3650M4实体机安装VCenter7.0
The code interface is a little automated
Plato farm is expected to further expand its ecosystem through elephant swap
1178 questions of Olympiad in informatics -- ranking of grades
UVM入门实验1
关于数据库的接口响应非常慢
pytorch_ demo1
2020 International Machine Translation Competition: Volcano translation won five championships
while Loop
All in one 1329 cells (breadth first search)
Shell scripts related
Development of three database general SQL code based on PG Oracle and MySQL










