This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 4 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(3)
它正在工作,问题是您的文本未居中。如果您向其中添加文本对齐中心,它将按照您期望的方式工作。
例子:
It is working, the problem is that your text is not centered. If you add text align center to it it will work the way you are expecting.
example:
如果你想在该容器内居中文本,你需要将其放在一个单独的 div 中,格式化该 div 的宽度(文本需要放置的位置)并将其居中。
在你的示例中,它将长度为 1000px 的 div 居中所以代码没有问题..:)
If you want to center text inside that container you need to put it in a separate div, format the width of that div(where your text need to go) and center it..
In your example it is centering the div which has length 1000px so there is no problem in code..:)
如果这确实有效,你可以随时使用:
if that did work you could always use: