Use attr to get the value of attribute : Attribute « CSS Style « XML

Home
XML
1.CSS Style
2.SVG
3.XML Schema
4.XQuery
5.XSLT stylesheet
XML » CSS Style » Attribute 
Use attr to get the value of attribute


File: Data.xml

<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/css" href="Style.css" ?>
<purchaseOrder orderID="x1129001">
    asdf
</purchaseOrder>

File: Style.css

purchaseOrder:before {
  font-family:arial, verdana, sans-serif;
  font-size:28px; 
  font-weight:bold;
  content:"Purchase Order Number: " attr(orderID);
}

 
Related examples in the same category
1.Style with attribute class
2.attributes Psuedo class
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.