Open In App
Related Articles

Tailwind CSS Fill

Improve Article
Save Article
Like Article

This class accepts lots of value in tailwind CSS in which all the properties are covered in class form. This class is a presentation attribute used to set the color of an SVG shape. In CSS, we have done that by using the CSS fill property.

FIll class:

  • fill-current: This class is used to set the fill color of an SVG to the current text color. This makes it easy to set an element’s fill color by combining this class with an existing text color utility.


<svg class="fill-current">...</svg>



<!DOCTYPE html> 
    <link href
<body class="text-center mx-4 space-y-2"
    <h1 class="text-green-600 text-5xl font-bold"
    <b>Tailwind CSS Fill Class</b
    <div class="bg-green-200 m-4 grid grid-flow-col gap-4 p-5"
        <svg height="150px" width="600px"
         <circle class="fill-current text-red-600" cx="100"
                cy="100" r="50" /> 
         <circle class="fill-current text-green-600" cx="250"
                cy="100" r="50" /> 
          <circle class="fill-current text-blue-600" cx="400"
                cy="100" r="50" /> 
          <circle class="fill-current text-yellow-600" cx="550"
                cy="100" r="50" /> 


Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out - check it out now!

Last Updated : 22 Mar, 2021
Like Article
Save Article
Similar Reads
Complete Tutorials