2017-02-12 87 views
0

我有這個測試頁面,我看到文本被包裝在Parent p元素中。但是我遇到的問題是,當我在我的網站上嘗試做同樣的事情時,我只看到span標籤的第一行。當超出P元素的寬度時,文本的其餘部分將被隱藏。span元素中的文本不包含在父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

,你需要看一下文字換行禁令標籤pspanwhite-space: nowrap或類似的東西。

相關問題