当前位置:网站首页>margin 塌陷和重合的理解
margin 塌陷和重合的理解
2022-08-04 17:56:00 【大鸡腿最好吃】
margin可以理解为不允许它设置范围内出现元素,比如说,你设置margin-top:为30px,那么该元素的上方30px就不允许出现元素
margin重合和塌陷可以分为兄弟直接和父子直接
兄弟之间的
可以设置第二个盒子的
浮动为left或者right
定位为绝对定位和固定定位
父子之间的(子元素的margin大于父元素,会把父元素的margin带下来)
设置子元素 的浮动为left或者right,子元素设置position的值为absolute/fixed,父元素加入:overflow:hidden
边栏推荐
猜你喜欢
下一代 AutoAI:从模型为中心,到数据为中心
2022 May 1 Mathematical Modeling Question C Explanation
CF86D Powerful array
Create Sentinel high-availability cluster current limiting middleware from -99
基于 eBPF 的 Kubernetes 可观测实践
荣耀发布开发者服务平台,智慧生态合作提速
pyhon爬虫之爬取图片(亲测可用)
EasyCVR如何通过接口调用设备录像的倍速回放?
荣耀互联对外开放,赋能智能硬件合作伙伴,促进全场景生态产品融合
智能视频监控平台EasyCVR如何使用接口批量导出iframe地址?
随机推荐
Create Sentinel high-availability cluster current limiting middleware from -99
2022年7月31日 暑假第三周总结
Iptables防火墙基础知识介绍
Fork/Join框架
DMPE-PEG-Mal,二肉豆蔻酰磷脂酰乙醇胺-聚乙二醇-马来酰亚胺简述
buuctf(探险1)
LeetCode 899. Ordered Queues
R语言使用ggpubr包的ggsummarystats函数可视化柱状图(通过ggfunc参数设置)、在可视化图像的下方添加描述性统计结果表格、palette参数配置柱状图及统计数据的颜色
OpenInfra Days China 2022 | SelectDB to share with you the Apache Doris in Internet advertising business practices
小程序学习目标
树莓派利用autofs自动挂载/卸载外部硬盘
darknet source code reading notes-02-list.h and lish.c
电源测试系统-ATE电源测试系统-ACDC电源模块测试系统NSAT-8000
静态iP与权限更改[通俗易懂]
leetcode 14. 最长公共前缀
Investigation and Research Based on the Involution Behavior of College Students
【技术笔记】树莓派4B开机流程整理(无显示器安装)
华为云计算HCIE之oceanstor仿真器的使用操作
解决错误:The package-lock.json file was created with an old version of npm
【无标题】