- 博客(3)
- 收藏
- 关注
原创 2021-06-22
水平垂直居中1. 父相子绝-left&margin-left-top&margin-top2. 父相子绝-top&bottom&left&right&margin3. 父相子绝-left&top&transform4. flex5. table-cell 1. 父相子绝-left&margin-left-top&margin-top <style> .father{ position: relat
2021-06-22 20:31:46 37
原创 2021-06-22
水平居中1. 子元素是行内元素1-1 行内元素-父元素不是块元素1-2 行内元素-父元素是块元素2. 子元素-margin3. 子元素设置为inline或inline-block4. 父相子绝-left&margin-left5. 父相子绝-left&right&margin6. 父相子绝-left&transform7. flex8. table-cell 1. 子元素是行内元素 1-1 行内元素-父元素不是块元素 <style> .father
2021-06-22 20:21:52 46
原创 2021-06-22
垂直居中(7种) 1. 父相子绝-top&margin-top <style> .father{ position: relative; width: 500px; height: 300px; background-color: black; } .son{ position: absolute;
2021-06-22 20:00:22 34
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人