Skip to content

this is just a small css class that will add an animated hover underline on elements

Notifications You must be signed in to change notification settings

ihaswn/css-animated-hover-underline

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

About

this is just a simple stylesheet providing a class for hover effect

Preview

preview

How to use

Just download the hover_underline.css file and either

  • import it inside the html document:
 <link rel="stylesheet" href="hover_underline.css">
  • or in a css stylesheet file that is already linked to your html document:
 @import url(hover_underline.css);

You just need to assign a HTML element the hover-underline class:

<h1 class="hover-underline">Lorem ipsum dolor sit amet consectetur</h1>

Settings

  • There are a few settings that you can assign to elements as css variables:
    • --ahu-transition-interval (default: 350ms)
    • --ahu-thickness (default: 3px)
    • --ahu-color (default: white)

usage example:

<h1 class="hover-underline" style="--ahu-thickness: 5px; --ahu-thickness: 5px; --ahu-transition-interval: 0.5s; --ahu-color: red;">Lorem ipsum dolor sit amet consectetur</h1>

About

this is just a small css class that will add an animated hover underline on elements

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published