Open In App

Tachyons Theming Hovers

Tachyons is a toolkit used to create a responsive website. In this article, we will learn how to include the hover effect using the Tachyons toolkit.  

Hover: This effect is used to tell what that button will do if you click on that image. It is also used to give visual affordance to the user that an element can be interacted with.



Tachyons Theming Hovers Classes:

Syntax:



<element class="class-name">...</element>

Example 1: In this example, we have used the grow class to scale to 1.05% of its normal size on hover.




<!DOCTYPE html>
<html>
  
<head>
    <link rel="stylesheet" href=
  
    <style>
        body {
            text-align: center;
            margin: 20px;
        }
    </style>
</head>
  
<body class="contain">
    <h2 style="color:green;">
        GeeksforGeeks
    </h2>
      
    <a class="grow dib f3-ns no-underline 
        bg-light-green black pa5" href="#">
        hover on this
    </a>
</body>
  
</html>

Output:

 

Example 2: In this example, we have used the dim class.




<!DOCTYPE html>
<html>
  
<head>
    <link rel="stylesheet" href=
  
    <style>
        body {
            text-align: center;
            margin: 20px;
        }
    </style>
</head>
  
<body class="contain">
    <h1 class="dim">
        GeeksforGeeks
    </h1>
</body>
  
</html>

Output:

 

Reference: https://tachyons.io/docs/themes/hovers/


Article Tags :