2017-02-12 10 views
0

このテストページは、テキストが親要素pの内側に折り返されていることがわかります。しかし、私が抱いている問題は、自分のウェブサイトで同じことをしようとするときです。私はスパンタグの最初の行しか見ることができません。残りのテキストは、P要素の幅を超えているときに隠されます。スパン要素内のテキストは、親のタグの幅内に折り返されません

問題を解決するためにChromeデベロッパーツールで何を表示する必要があるか教えてください。

<html> 
    <body> 
     <p style="width: 120px;"> 
      <span> 
       Jellyfish or jellies[1] are softbodied, free-swimming aquatic animals with a gelatinous umbrella-shaped bell and trailing tentacles. The bell can pulsate to acquire propulsion and locomotion. The tentacles may be utilized to capture prey or defend against predators by emitting toxins in a painful sting. Jellyfish species are classified in the subphylum Medusozoa which makes up a major part of the phylum Cnidaria, although not all Medusozoa species are considered to be jellyfish. 
      </span> 
     </p> 
    </body> 
</html> 

答えて

0

あなたはタグpまたはspanのためにワードラップの禁止を見てする必要があります。 white-space: nowrapまたは同様のもの。

関連する問題