2013-01-19 27 views
0

this answer,我能与Firefox插入一些文本这样插入HTML与XBL

CSS

body 
{ 
    -moz-binding: url(foo.xml#bar); 
} 

foo.xml

<bindings xmlns="http://www.mozilla.org/xbl"> 
    <binding id="bar"> 
    <content> 
     Hello world 
    </content> 
    </binding> 
</bindings> 

但是我无法找到一个办法使用此方法插入HTML而不是文本。

回答

0

看来,我只需要申报XHTML namespace

<bindings xmlns="http://www.mozilla.org/xbl" 
    xmlns:html="http://www.w3.org/1999/xhtml"> 
    <binding id="bar"> 
    <content> 
     <html:b> 
     Hello world 
     </html:b> 
    </content> 
    </binding> 
</bindings>