当前位置:网站首页>The collapse of margin
The collapse of margin
2022-07-24 18:08:00 【Jiojio is learning le】
demo: A parent box is nested with a child box , Sub box margin-top Collapse caused by .
6 Methods :
1. Add to parent box border
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <title>Document</title>
- <style type="text/css">
- body {
- margin: 0;
- padding: 0;
- }
- .parent {
- width: 400px;
- height: 400px;
- background-color: red;
- margin: 0 auto;
- }
- .son {
- width: 200px;
- height: 200px;
- background-color: green;
- margin: 0 auto;
- margin-top: 100px;
- }
- </style>
- </head>
- <body>
- <div class="parent">
- <div class="son"></div>
- </div>
- </body>
- </html>
边栏推荐
- Flink operation Hudi data table
- 1688/ Alibaba searches new product data by keyword API instructions
- 颜色的13 个必备方法!
- Use prometheus+grafana to monitor MySQL performance indicators
- Three ways of redis cluster
- Simple test JS code
- [OBS] dependency Library: x264 vs Build
- redis集群的三种方式
- Wu Enda writes: how to establish projects to adapt to AI career
- 0616项目二结束~~总总结
猜你喜欢

Shardingsphere database read / write separation

After separation, the impression notes are still difficult to live, but there are many coquettish operations

0630~职业素养课

Go language file operation

The use and Simulation of character and string library functions in C language

redis集群的三种方式

Win10 super good-looking mouse theme, you also try it

手写博客平台~第二天

Quickly complete the unit test junit4 setting of intelij idea

Emerging potential of interactive virtual reality technology in drug discovery
随机推荐
0616 end of Project II ~ ~ general summary
还在从零开始搭建项目?这款升级版快速开发脚手架值得一试!
Introduction and use of Pinia
Section 9 cache penetration follow Daewoo redis ------- directory posts
阿里巴巴/1688按图搜索商品(拍立淘) API使用说明
1688/ Alibaba searches new product data by keyword API instructions
Inherit, override, overload
0613 ~ self study
Int8 & int8, have you ever stumbled like this?
安装JumpServer
How to follow the "low coupling" design principle?
Shardingsphere database read / write separation
Goodbye Navicat! This open source database management tool has a cooler interface!
Alibaba 1688 keyword search product API usage display
0615~用自定义注解实现RBAC权限管理
[leetcode] 30. Concatenate substrings of all words
Interview assault 66: what is the difference between request forwarding and request redirection?
Ship new idea 2022.2 was officially released, and the new features are really fragrant!
Gan Development Series II (pggan, Singan)
Learn redisson from scratch ------- topics (subscription and distribution)