摘要:在CSS布局时经常会需要实现水平居中,垂直居中,水平垂直居中这样的要求但是却又不是非常的在意,所以总结一下。 文本水平居中 1.使用text-align属性:将容器的text-align属性设置为"center",可以使文本在容器中水平居中。 <style> .container { width:
阅读全文
posted @ 2023-12-26 09:29
|
|||
随笔分类 - Tailwind CSS
摘要:在CSS布局时经常会需要实现水平居中,垂直居中,水平垂直居中这样的要求但是却又不是非常的在意,所以总结一下。 文本水平居中 1.使用text-align属性:将容器的text-align属性设置为"center",可以使文本在容器中水平居中。 <style> .container { width:
阅读全文
posted @ 2023-12-26 09:29
|
|||