2010-03-21 54 views
3

例如:是否可以将一个VML嵌套在另一个VML中?

<v:roundrect style="display:block;width:100px;height:100px;" fillcolor="#eee"> 
Hi 
    <v:roundrect style="display:block;width:50px;height:50px;" fillcolor="#c00"> 
     Hey 
    </v:roundrect> 
</v:roundrect> 

我不能看到内部ROUNDRECT的背景时,我使用该标记。

任何想法?

回答

5

没有VML形状可以相互嵌套。您需要对它们进行定位,以便它们正确重叠。

<div style="position:relative;"> 
    <v:roundrect style="display:block;width:100px;height:100px;" fillcolor="#eee"> 
    Hi 
    </v:roundrect> 
    <v:roundrect style="display:block;width:50px;height:50px; top: 25px; left:25px; position:absolute;" fillcolor="#c00"> 
    Hey 
    </v:roundrect> 
</div> 
+0

很遗憾,我想把它们包装在div上,但div可能会嵌套在一起。无论如何,谢谢你的回复。 – darkangel 2010-03-22 12:48:58

+0

来源请? – 2018-02-20 14:47:36

相关问题