Skip to content
Related Articles
Get the best out of our app
GeeksforGeeks App
Open App
geeksforgeeks
Browser
Continue

Related Articles

Tailwind CSS Outline

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

This class accepts lots of value in tailwind CSS in which all the properties are covered as in class form. This class is used to control an element’s outline.

Outline Classes:

  • outline-none: This class is used to hide the default browser outline on focused elements.
  • outline-white: This class is used to add a white 2px dotted border around an element with a 2px offset.
  • outline-black: This class is used to add a black 2px dotted border around an element with a 2px offset.

Syntax:

<element class="outline-{style}">...</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 mx-4 space-y-2">
    <h1 class="text-green-600 text-5xl font-bold">
        GeeksforGeeks
    </h1>
    <b>Tailwind CSS Outline Class</b>
    <div class="mx-6 bg-green-200 grid grid-rows-3
                grid-flow-col text-justify p-4">
 
        <input class="placeholder-gray-500 p-3 m-2 rounded-lg
                    border-2 border-green-400 bg-green-100
                    focus:outline-none"
               placeholder="Outline-none">
        <input class="placeholder-gray-500 p-3 m-2 rounded-lg
                      border-2 border-green-400 bg-green-100
                      focus:outline-white"
               placeholder="Outline-white">
 
        <input class="placeholder-gray-500 p-3 m-2 rounded-lg
                    border-2 border-green-400 bg-green-100
                    focus:outline-black"
               placeholder="Outline-black">
    </div>
</body>
 
</html>

Output:


My Personal Notes arrow_drop_up
Last Updated : 09 Dec, 2022
Like Article
Save Article
Similar Reads
Related Tutorials