2017-02-12 82 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或类似的东西。

相关问题