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






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