Open In App

Tachyons Theming Opacity

Tachyons toolkit is used to create a responsive website. In this article, we will learn how to define the opacity effect on our website using the Tachyons toolkit. 

Opacity: It is the visibility effect that we can change according to our needs. 



Syntax:

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

Tachyons Theming Opacity Classes:



Example 1: This code demonstrates the 0-90 class of Tachyons toolkit.




<!DOCTYPE html>
<html>
  
<head>
    <link rel="stylesheet" href=
  
    <style>
        body {
            text-align: center;
            margin: 20px;
        }
    </style>
</head>
  
<body class="contain">
    <img src=
        alt="GFG image"
        class="o-90" />
</body>
  
</html>

Output:

 

Example 2: This code demonstrates the 0-20 class of Tachyons toolkit.




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

Output:

 

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


Article Tags :