When you create a pseudo element, you have access to the parent HTML attributes. They can be used inside the content
attribute of a pseudo element.
[data-length]:hover:after { content: attr(data-length) " / " attr(data-weight); color: orange; position: absolute; right: 1em;}
- Tyrannosaurus
- Carnotaurus
- Stegosaurus
- Triceratops