当前位置:网站首页>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这个类即可
边栏推荐
- 7-16 daily sword finger offer II 041. Average value of sliding window
- Error: slf4j: class path contains multiple slf4j bindings
- Firefox 103 release, faster and more secure
- 爬虫
- Cvpr22 | graph neural architecture search of relational consciousness
- Gartner authority predicts eight development trends of network security in the next four years
- SSM实战项目-前后分离(简单易懂)
- CEPH distributed storage performance tuning (6)
- 字节跳动的 Flink OLAP 作业调度和查询执行优化实践
- js真伪数组转换
猜你喜欢

GAN:生成对抗网络 Generative Adversarial Networks

Detail throw and throws
![[cute new solution] Fibonacci sequence](/img/2d/64cdc8b7625ee7a81275ad25dc2b7a.png)
[cute new solution] Fibonacci sequence

Open source project - taier1.2 release, new workflow, tenant binding simplification and other functions

详述try-catch-finally

BSP视频教程第21期:轻松一键实现串口DMA不定长收发,支持裸机和RTOS,含MDK和IAR两种玩法,比STM32CubeMX还方便(2022-07-24)

How to ask questions on the road for the first time - necessary skills for self-study (with live playback)

Background and framework introduction and basic environment preparation of hucang integrated e-commerce project

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 (

Eccv2022 | Ru & Google proposed to use clip for zero shot target detection!
随机推荐
写出一个程序,接受一个有字母和数字以及空格组成的字符串,和一个字符,然后输出输入字符串中含有该字符的个数。不区分大小写。
heap
@Simple understanding and use of conditionalonproperty
PySide6/PyQt开发经验总结(2) - 设置快捷键
Do you really understand CMS garbage collector?
js真伪数组转换
Eccv2022 | Ru & Google proposed to use clip for zero shot target detection!
详述jdbc查询方法执行过程
POJ1273 Drainage Ditches【最大流】【SAP】
What should I do if I can't see any tiles on SAP Fiori launchpad?
xshell7可以登录mysql虚拟机不能登陆mysql
Self built personalized automatic quotation system to cope with changeable quotation mode
MySQL扩展
关于 CMS 垃圾回收器,你真的懂了吗?
How to get class objects
Connotative quotations
Feign的整体流程
What are metauniverse and NFT digital collections?
二分法查询数组中的值
Gan: generate adversarial networks