css有趣的面试题

💡 原文中文,约700字,阅读约需2分钟。
📝

内容提要

使用纯CSS实现文字内容一行居中,两行居左的效果。通过设置父元素宽度为100%,text-align属性居中文字内容。使用word-break属性实现换行。设置子元素为inline-block,text-align属性居左文字内容。

🏷️

标签

➡️

继续阅读