当前位置:网站首页>Block level element block inline element inline inline block level element inline block and mutual conversion
Block level element block inline element inline inline block level element inline block and mutual conversion
2022-07-20 09:07:00 【Ares-Wang】
Inline elements : Generally, it is the container of content , Block-level elements : Generally, it is the container of other containers
Block level elements can include block level elements and inline elements .
Inline elements are suitable for displaying specific content , Block level elements are suitable for layout ,CSS+DIV Layout , Now the mobile terminal layout is recommended Flex Layout , Because the elastic layout is pc There is a problem with the end compatibility for the time being , future pc End also can FLex Layout , This is the trend
Block-level elements : Monopolize one line , Width and height 、margin、padding take effect , If the width is not set , The default is the width of the browser
Inline elements : You can have multiple tags on one line , It does not take effect for width and height attributes , It's all about content ., Only right margin,padding It will come into effect .
Inline block level elements : Combine the advantages of inline elements and block level elements , Both width and height can be set , It can make padding、margin take effect , It can also be inline with other elements side by side
1、float: When setting the inline element to float , Of the inline element display Attributes will be assigned block value , And has floating characteristics ,
Some materials say . Inline elements remove the inexplicable blank between , But my test did not .
2、position: When positioning inline elements ,absolute and fixed Will change the original inline element into a block level element .
边栏推荐
猜你喜欢
The problem of data set CSV coding format in machine learning
104 Polkadot substrate: licensed network
[JS] shallow copy and deep copy
微信小程序 - 所有页面一次性(只需要执行一次)全部开启分享朋友圈功能(wx.showShareMenu)
支付宝支付和微信支付容易被风控可以看一下这个操作
LeedCode 思维训练(二)
Talk about the redis cache penetration scenario and the corresponding solutions
响应式布局【Responsive】 与 自适应布局 【adaptive】、单页面【SPA】 和多页面【MPA】
Crudapi add, delete, modify and check the successful case of interface zero code product: Chamber of Commerce Alliance card project
命令行反编译重打包
随机推荐
Summary of basic knowledge of MySQL and redis
支付账户体系(分账接口)的9大价值
Horizontal comparison between distributed transaction framework Seata and Hmily
第三方支付的发展趋势及优势
[untitled] MySQL binlog data recovery process
Static library A documents and Framework file
手写一个AIDL
聚合支付满足各行业接入多种支付通道
变量的集体声明注意点
块级元素 block 内联元素 inline 内联块级元素inline-block 以及相互转换
Popular science of cryptography
MYSQL日志模块
Android Studio 执行 Kotlin 抛出 com.android.builder.errors.EvalIssueException 问题的解决方法
102 polkadot substrate : 存在证明
108 Polkadot substrate: private network
密码学科普
Crudapi add, delete, modify and check interface zero code product success case Golden Tea King voting system
CPU架构兼容
How to capture the data of APP websites
EXCEL中VLOOKUP的使用