8

テキストが留まらない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/

4

3 に答える 3

16

これで問題が解決します:

#toronto-content {
  white-space: normal;
}

<p>ただし、テキストをor<span>タグに入れることを検討します。

于 2013-10-17T19:56:27.207 に答える
4

これは、テキストの量がdiv.
スタイルに追加することをお勧めoverflow:overlayします。これにより、コンテンツのすぐ隣に垂直スクロール バーが作成されます。

追加overflow:scrollすると、必要がなくても水平スクロールバーが作成されます。

それが望ましくない場合は、コンテンツが多すぎるときにページを追加するか (「ページネーション」と呼ばれます)、Javascript または jQuery を使用してカスタムの垂直スクロールバーを作成する必要があります。

于 2013-10-17T20:11:14.910 に答える