Files
ClassContent/历届学生/韩想/每日课程/202-07-28/笔记.txt
2024-09-27 02:06:13 +08:00

47 lines
1014 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

1盒子模型属性
外边距 margin
内边距 padding
border 边框
content 内容
盒子模型真实宽高 = width + height+ 内边距 + 边框
box-sizing: border-box; 去除盒子模型的计算规则,向内塌陷!!
2定位
相对定位 relative
1: 当一个元素被设置 相对定位 后,它原本位置没有被删除
2元素会被浮动
3: 定位参考对象是他自己的原本位置
绝对定位 absolute
1当一个元素被设置 绝对定位 后,它原本位置被删除,其他元素将会占据它的位置
2元素会被浮动
3定位参考对象
1如果有父元素父元素如果没有设置定位那么参考浏览器边框定位定位
2如果有父元素父元素设置定位那么参考父元素进行定位
固定定位 fixed
1 当一个元素被设置 相对定位 后,它原本位置被删除
2元素会被浮动
3定位参考对象是浏览器边框
流布局
nth-child
响应式:
1flex