Front End/Tailwind CSS

[TailWind] Colors 색상공부

닥치고개발 2022. 10. 22. 00:36
728x90

Color 클래스에 대해서 알아보자

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <script src="https://cdn.tailwindcss.com"></script>
    <title>Colors</title>
  </head>
  <body>
    <!-- Default colors -->
    <!-- white, black, red, green, blue, orange, yellow, purple, lime, emerald, teal, cyan, indigo, violet, fuchsia, pink, rose, sky, gray, slate, zinc, neutral, stone, amber,  -->

    <!-- Text Colors -->
    <p class="text-black-200">Tailwind is awesome</p>
    <p class="text-white">Tailwind is awesome</p>
    <p class="text-pink-500">Tailwind is awesome</p>
    <p class="text-red-500">Tailwind is awesome</p>
    <p class="text-green-500">Tailwind is awesome</p>
    <p class="text-blue-500">Tailwind is awesome</p>
    <p class="text-remerald-500">Tailwind is awesome</p>
    <p class="text-zinc-500">Tailwind is awesome</p>
    <p class="text-slate">Tailwind is awesome</p>

    <!-- Background Colors -->
    <p class="bg-slate-800">Tailwind is good</p>
    <p class="bg-emerald-100">Tailwind is good</p>
    <p class="bg-emerald-200">Tailwind is good</p>
    <p class="bg-yello-300">Tailwind is good</p>
    <p class="bg-pink-500 text-white">Tailwind is good</p>

    <!-- Text Underline -->
    <p class="underline decoration-red-500">Tailwind is awesome!</p>

    <!-- Border Colors -->
    <input type="text" class="border border-blue-400">

    <!-- Divide Colors -->
    <div class="divide-y divide-blue-300">
      <div>Item 1</div>
      <div>Item 2</div>
      <div>Item 3</div>
      <div>Item 4</div>
      <div>Item 5</div>
    </div>

    <!-- Outline Colors -->
    <button class="outline outline-red-500 p-3 m-3">Hello, wordl!</button>

    <!-- Box Shadow Colors (Opacity defaults to 100, but you can set it)-->
    <button class="shadow-lg bg-cyan-500 shadow-purple-500/50">Subcribe</button>

    <!-- Accent Colors -->
    <input type="checkbox" class="accent-pink-500" checked />

    <!-- Arbitrary Colors -->
    <div class="bg-[#427FAB]">Hello.....</div>
    <div class="bg-[rgb(255,0,0)]">Hello.....</div>
    <div class="bg-[pink]">Hello.....</div>
    <div class="bg-pink">Hello.....</div>
  </body>
</html>

728x90