web前端知识点小结 (四)

html居中方法 1.水平居中 a)宽度为明确值:margin-left和marginright同时为auto; b)宽度不肯定:position:absolute;left:50%html 2.垂直居中 margin-top:x%; 其中x = (100% - 元素高度占据容器的比例) / 2;web 或者svg position:absolute top:50% margin-
相关文章
相关标签/搜索