当前位置:网站首页>clearfix的作用
clearfix的作用
2022-07-27 12:48:00 【不好意思,此人不存在】
clearfix
<!DOCTYPE html>
<html lang="ch">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style> .box1{
width: 200px; height: 200px; background-color: #bbffaa; } /* .box1::before{ content: ''; display: table; } */ .box2{
width: 100px; height: 100px; background-color: orange; margin-top: 100px; } /* clearfix 这个样式可以同时解决高度塌陷和外边距重叠的问题,当你再遇到这些问题时,直接使用clearfix这个类即可 */ .clearfix::before, .clearfix::after{
content: ''; display: table; clear: both; } </style>
</head>
<body>
<div class="box1">
<div class="box2"></div>
</div>
</body>
</html>
--clearfix 这个样式可以同时解决高度塌陷和外边距重叠的问题,当你再遇到这些问题时,直接使用clearfix这个类即可
边栏推荐
- AMD Adrenalin 22.7.1 驱动更新:OpenGL 性能翻倍,支持微软 Win11 22H2 系统
- 银行案例|Zabbix跨版本升级指南,4.2-6.0不香吗?
- nodejs body-parser中间件处理类型 multipart/form-data 的 POST 表单数据,req.body无法接收到数据
- 关于2022年3月9日之后Typora登录不了--已解决
- [node+ts] build node+typescript project
- What are metauniverse and NFT digital collections?
- Open source project - taier1.2 release, new workflow, tenant binding simplification and other functions
- Basic architecture of data Lake
- 爱可可AI前沿推介(7.27)
- POJ1273 Drainage Ditches【最大流】【SAP】
猜你喜欢

B站713故障后的多活容灾建设|TakinTalks大咖分享

Baoli food listed on Shanghai Stock Exchange: annual revenue of 1.578 billion, market value of 5.8 billion

BSP video tutorial issue 21: easy one key implementation of serial port DMA variable length transceiver, support bare metal and RTOS, including MDK and IAR, which is more convenient than stm32cubemx (

Xposed+fdex2 app shelling (black cat complains about app shelling)

JS true / false array conversion

Overview of static inner classes and non static inner classes
QT | qcheckbox of control

Aike AI frontier promotion (7.27)

文章复现:SRCNN

Background and framework introduction and basic environment preparation of hucang integrated e-commerce project
随机推荐
500强企业如何提升研发效能?来看看行业专家怎么说!
关于2022年3月9日之后Typora登录不了--已解决
事务四大特性(ACID):
关于 CMS 垃圾回收器,你真的懂了吗?
QT | qcheckbox of control
Summary of common methods of ArrayList
redis分布式在线安装
What are metauniverse and NFT digital collections?
Top 10 international NFT exchanges
Jesd204b debugging notes (practical version)
Aike AI frontier promotion (7.27)
Map interface
Poj1273 drainage ditches [maximum flow] [SAP]
[expression calculation] double stack: general solution of expression calculation problem
18. Text processing tool -grep
About typora's inability to log in after March 9, 2022 -- resolved
Specify the add method of HashSet
Pyside6/pyqt development experience summary (2) - set shortcut keys
Self built personalized automatic quotation system to cope with changeable quotation mode
Xposed+FDex2 app脱壳 (黑猫投诉app脱壳)