Pseudo elements can contain content from attributes of the element

Tags: pseudo

Categories: css, Web Development

Bound to come in useful at some point and definately one to keep in mind. You can bring in a string from an attribute to the content property of a pseudo element.


a:after {
content: "clicking this will take you to: " attr(href);
}

2 Comments

  • Virginia said

    Appreciating the persistence you put into your site and detailed information you provide.It’s awesome to come across a blog every once in a while that isn’t the same outdated rehashed material.Wonderful read! I’ve saved your site and I’m including your RSS feeds to my Google account.
    https://usawriters.org/

Add a Comment