Skip to content
Related Articles

Related Articles

Improve Article

Tailwind CSS Outline

  • Last Updated : 12 Mar, 2021

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="Ouline-none"
        <input class="placeholder-gray-500 p-3 m-2 rounded-lg 
                      border-2 border-green-400 bg-green-100
                      focus:outline-white" 
               placeholder="Ouline-white"
  
        <input class="placeholder-gray-500 p-3 m-2 rounded-lg 
                    border-2 border-green-400 bg-green-100
                    focus:outline-black" 
               placeholder="Ouline-black"
    </div
</body
  
</html

Output:




My Personal Notes arrow_drop_up
Recommended Articles
Page :