Skip to content
Related Articles

Related Articles

Tailwind CSS Divide Opacity

Improve Article
Save Article
  • Last Updated : 23 Mar, 2022
Improve Article
Save Article

This class accepts lots of value in tailwind CSS in which all the properties are covered in class form. By using this class we can set the opacity of any divide. In CSS, we do that by using the CSS Opacity property.

Divide Opacity Classes:

  • divide-opacity-0: Control the opacity of an element’s placeholder color using the divide-opacity-{amount} utilities.

Note: The number of the opacity can be changeable from 0 to 100 with the span of 5.

Syntax:

<element class="divide-{opacity}">...</element>

Example:

HTML




<!DOCTYPE html> 
<html
<head
    <link
    href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css"
    rel="stylesheet"
</head
  
<body class="text-center"
    <h2 class="text-green-600 text-5xl font-bold"
    GeeksforGeeks 
    </h2
    <b>Tailwind CSS Divide Opacity Class</b
    <div class="mx-4 bg-green-200 p-2">
        <div class="grid grid-cols-3 divide-x-4 
                    divide-pink-500 divide-opacity-25">
            <div><b>1.</b>GeeksforGeeks</div>
            <div>A Computer Science Portal</div>
            <div>For Geeks</div>
        </div>
        <div style="height:10px"> </div>
         <div class="grid grid-cols-3 divide-x-4 
                     divide-pink-500 divide-opacity-50">
            <div><b>2.</b>GeeksforGeeks</div>
            <div>A Computer Science Portal</div>
            <div>For Geeks</div>
        </div>
        <div style="height:10px"> </div>
         <div class="grid grid-cols-3 divide-x-4
                     divide-pink-500 divide-opacity-80">
            <div><b>3.</b>GeeksforGeeks</div>
            <div>A Computer Science Portal</div>
            <div>For Geeks</div>
        </div>
    </div>
</body
</html>


Output: 

Divide Opacity Class


My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!