float:左边的属性

Pat*_*101 0 html css position css-float

在我的网页上,当我使用浮动时:左侧为导航栏按钮(为了水平排列),它会在向右移动后生成内容,例如:

[ Home About More ]
                   Text
Run Code Online (Sandbox Code Playgroud)

我希望它是:

[ Home About More ]
Text
Run Code Online (Sandbox Code Playgroud)

有什么建议?

Hug*_*ota 6

您需要clear在Text中使用该属性.像这样:

.text {clear:left}
Run Code Online (Sandbox Code Playgroud)