HTML CSS examples for CSS Animation:Hover
Line-through animation when hovered
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> .strike {<!--from ww w . j a v a 2 s. c om--> position: relative; } .strike:before { content:" "; position: absolute; left: 0; top: 50%; border-bottom: 1px solid red; width: 100%; transition: left 2s; } .strike:hover:before { left: -120% } </style> </head> <body> <span class="strike"> Hello </span> </body> </html>