Css 中心网站发布 我在浏览器的中间寻找我的中心网站。这是我的网站:

Css 中心网站发布 我在浏览器的中间寻找我的中心网站。这是我的网站:,css,web,center,Css,Web,Center,左侧正确居中,但右侧编号。实际代码: <style> .wrapper { width: 900px; margin: auto; } </style> <div class="wrapper"> HelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHell

左侧正确居中,但右侧编号。实际代码:

<style>
.wrapper {
    width: 900px;
    margin: auto;
}
</style>

<div class="wrapper">
HelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHello
</div>

.包装纸{
宽度:900px;
保证金:自动;
}
Hellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohello

谢谢

目前您的内容没有空格:

.wrapper {
    width: 900px;
    margin: auto;
    word-wrap: break-word; // this rule will resolve your problem
}
由于您的文本是不可破坏的,您需要使用属性和
中断字
值:

表示通常不可破的单词可能在任意时间被破译 如果线中没有其他可接受的断点,则为点


添加
wordwrapp:break word
。wrapper
现在我有另一个问题,我不能添加高度,我怎么能?包装有黄色的背景,我怎样才能增加高度呢?[已经解决,抱歉]
#wrapper { 
    width: 50%;
    margin: 0 auto;
    word-wrap: break-word;
}