Tailwind CSS Divide Opacity

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"
    w3wiki 
    </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>w3wiki</div>
            <div>A Computer Science Portal</div>
            <div>For Beginner</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>w3wiki</div>
            <div>A Computer Science Portal</div>
            <div>For Beginner</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>w3wiki</div>
            <div>A Computer Science Portal</div>
            <div>For Beginner</div>
        </div>
    </div>
</body
</html>


Output: 

Divide Opacity Class