我有一个div,文本不会留在里面,我不知道为什么,我以前从来没有遇到过这个问题,我希望有人能帮助我,这是我的代码:
HTML:
#toronto-content {
position: relative;
z-index: 98;
height: 100%;
width: 700px;
background-color: #0A0A0A;
color: #FFF;
}<div id="toronto-content">
Interactively pursue long-term high-impact vortals and distributed systems. Competently streamline team driven testing procedures without leading-edge intellectual capital. Energistically engage market-driven catalysts for change via client-centered technologies.
Compellingly architect long-term high-impact intellectual capital and resource-leveling interfaces. Phosfluorescently initiate market positioning supply chains with stand-alone processes. Collaboratively generate leading-edge services for synergistic
e-markets. Conveniently syndicate bleeding-edge resources whereas equity invested scenarios. Collaboratively parallel task backward-compatible deliverables and business relationships. Assertively implement turnkey niche markets for technically sound
human capital. Collaboratively integrate pandemic niche markets with corporate action items. Quickly utilize timely paradigms after best-of-breed infomediaries. Appropriately drive future-proof initiatives via standards compliant opportunities. Uniquely
coordinate 24/365 mindshare vis-a-vis top-line synergy. Phosfluorescently benchmark one-to-one mindshare with high-payoff best practices. Distinctively supply principle-centered relationships whereas revolutionary relationships.
</div>
如果您想查看完整的站点,请访问此处:http://lasociete.ca/new/
发布于 2013-10-18 03:56:27
这将解决您的问题:
#toronto-content {
white-space: normal;
}但我会考虑将文本放入<p>或<span>标记中。
发布于 2013-10-18 04:11:15
这是因为文本的数量大于div。
我建议在样式中添加overflow:overlay,这将在内容旁边创建一个垂直滚动条。
如果你添加overflow:scroll,它将创建一个水平滚动条,即使不需要。
如果这不是你想要的,你应该在有太多内容的时候添加页面(称为“分页”),或者用Javascript或jQuery制作一个自定义的垂直滚动条。
发布于 2017-12-17 20:30:53
添加这个
#toronto-content {
white-space: normal;
overflow: hidden;
}https://stackoverflow.com/questions/19435967
复制相似问题