Using Custom Data Attributes and Pseudo-Elements

In today’s tutorial I want to show you some simple CSS tricks using data attributes and pseudo-elements. The aim is to create an image caption using only an anchor and an image as markup. We’ll be exploring how to create pseudo-elements from some data attribute values and use them in a hover effect or simply show them next to the image. Using (more) semantic markup is of course what you should be doing, especially for data that is important to be shown. But this is a mere exercise for learning how to use those properties and how to create some nice effects.


Using Custom Data Attributes and Pseudo-Elements


Full post: Using Custom Data Attributes and Pseudo-Elements 

0 Comments:

Post a Comment