xbl-children-1.xhtml 836 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <html xmlns="http://www.w3.org/1999/xhtml">
  2. <head>
  3. <bindings xmlns="http://www.mozilla.org/xbl"
  4. xmlns:xhtml="http://www.w3.org/1999/xhtml">
  5. <binding id="a">
  6. <content>
  7. <xhtml:div class="aparent">
  8. <xhtml:div class="a">
  9. <children>
  10. <xhtml:div class="b">
  11. TEXT
  12. </xhtml:div>
  13. </children>
  14. </xhtml:div>
  15. </xhtml:div>
  16. </content>
  17. </binding>
  18. </bindings>
  19. <style>
  20. @namespace xbl "http://www.mozilla.org/xbl";
  21. .a > .b { color: green; }
  22. .a > xbl|children > .b { text-decoration: underline; }
  23. .a .b { text-transform: lowercase; }
  24. .aparent > * > .b { background: yellow; }
  25. /* Inverse cases. */
  26. .a > * > xbl|children > .b { color: red !important; }
  27. </style>
  28. </head>
  29. <body>
  30. <div style="-moz-binding: url(#a);" />
  31. </body>
  32. </html>