摘要:
参考: https://www.runoob.com/css/css-align.html 居中对齐 元素居中对齐 margin: auto 设置元素的宽度将防止它溢出到容器的边缘 元素通过指定宽度, 并将两边的空外边距平均分配 <!DOCTYPE html> <html lang="en"> <h 阅读全文
摘要:
参考: https://www.runoob.com/css/css-float.html 1. 什么是Float? CSS的Float, 会使元素向左或向右移动, 其周围的元素也会重新排列, 往往是用于图像, 但它在布局时一样非常有用 2. 元素怎样浮动? 元素的水平方向浮动, 意味着元素只能左右 阅读全文
摘要:
参考: https://www.runoob.com/css/css-float.html 1. 什么是Float? CSS的Float, 会使元素向左或向右移动, 其周围的元素也会重新排列, 往往是用于图像, 但它在布局时一样非常有用 2. 元素怎样浮动? 元素的水平方向浮动, 意味着元素只能左右 阅读全文
摘要:
参考: https://www.runoob.com/css/css-positioning.html 代码: https://github.com/zjy4fun/html-css-learn/issues/2 position用来决定元素在文档中的定位方式 static, 元素的top, rig 阅读全文