相关疑难解决方法(0)

通过CSS强制自动换行

目前TEST TEST并排出现.如何将一个推到第二行?只能通过CSS.

<div id="box"><p>TEST TEST</p></div>

#box{
    height: 50px;
    text-align: center;
    position: relative;
    margin: 0 auto;
    background-color: red;
    color: white;
    display: inline-block;
    padding-left: 5px;
    padding-right: 5px;
}
Run Code Online (Sandbox Code Playgroud)

html css

16
推荐指数
4
解决办法
3万
查看次数

标签 统计

css ×1

html ×1