本文介绍了您可以使用< span>在< span&gt ;?内的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
/TR/html401/struct/global.html#h-7.5.3\"> HTML4规范说明:

Span是一个内联元素,因此跨度跨度内有效。
有一个相关问题:更改元素的术语和分类,但您可以看到它仍然可以将span放在另一个span中。


Here is the story: I'm using SWFObject to insert a Flash object into my page. The embedding eats my span. So, I lose all my CSS for it. I was thinking of moving all of the CSS to the parent so I don't lose my CSS styles when the Flash appears.

I have tried using a span within a span, but I don't think it's working. Is there a reason for this? I don't understand why you could have div within a div but not a span within a span.

Does it have to do with spans being inline?

解决方案

HTML4 specification states that:

Span is an inline element, therefore having span inside span is valid.There's a related question: Can <span> tags have any type of tags inside them? which makes it completely clear.

HTML5 specification changes terminology and classification for elements, but you can see that it's still valid to place span inside another span.

这篇关于您可以使用&lt; span&gt;在&lt; span&gt ;?内的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-12 13:08