- Published on
Advanced Guide: Build A Landing Page With Tailwind CSS With Tailwind CSS

- What is Tailwind CSS?
- The description of Landing Page with Tailwind CSS ui component
- Why use Tailwind CSS to create a Landing Page with Tailwind CSS ui component?
- The preview of Landing Page with Tailwind CSS ui component
- The source code of Landing Page with Tailwind CSS ui component
- How to create a Landing Page with Tailwind CSS with Tailwind CSS?
- Install tailwind css of verion 1.0.4
- All the unility class needed to create a Landing Page with Tailwind CSS component
- 118 steps to create a Landing Page with Tailwind CSS component with Tailwind CSS
- Conclusion
What is Tailwind CSS?
Tailwind CSS is a utility-first CSS framework that focuses on creating personalized user interfaces quickly. It can gives you all the building blocks you are able to create personalized designs without having to fight to override irritating opinionated styles. Also, Tailwind CSS is a highly configurable, low-level CSS framework.
The description of Landing Page with Tailwind CSS ui component
Inspired from a dribble shot by dribbble.com/shots/7211356/attachments/203393
@codepen codepen.io/mithicher/pen/joeggyo
Why use Tailwind CSS to create a Landing Page with Tailwind CSS ui component?
- It can make the building process of Landing Page with Tailwind CSS ui component faster and more easily.
- Enables building complex responsive layouts and components freely.
- Minimum lines of CSS code in Landing Page with Tailwind CSS component file.
The preview of Landing Page with Tailwind CSS ui component
Free download of the Landing Page with Tailwind CSS's source code
The source code of Landing Page with Tailwind CSS ui component
<div class="font-sans bg-white flex flex-col min-h-screen w-full">
<div>
<div class="bg-gray-200 px-4 py-4">
<div
class="w-full md:max-w-6xl md:mx-auto md:flex md:items-center md:justify-between"
>
<div>
<a href="#" class="inline-block py-2 text-gray-800 text-2xl font-bold"
>Stats.</a
>
</div>
<div>
<div class="hidden md:block">
<a
href="#"
class="inline-block py-1 md:py-4 text-gray-600 mr-6 font-bold"
>How it Works</a
>
<a
href="#"
class="inline-block py-1 md:py-4 text-gray-500 hover:text-gray-600 mr-6"
>Solutions</a
>
<a
href="#"
class="inline-block py-1 md:py-4 text-gray-500 hover:text-gray-600 mr-6"
>Pricing</a
>
<a
href="#"
class="inline-block py-1 md:py-4 text-gray-500 hover:text-gray-600 mr-6"
>Desktop</a
>
</div>
</div>
<div class="hidden md:block">
<a
href="#"
class="inline-block py-1 md:py-4 text-gray-500 hover:text-gray-600 mr-6"
>Login</a
>
<a
href="#"
class="inline-block py-2 px-4 text-gray-700 bg-white hover:bg-gray-100 rounded-lg"
>Start a free trial</a
>
</div>
</div>
</div>
<div class="bg-gray-200 md:overflow-hidden">
<div class="px-4 py-16">
<div class="relative w-full md:max-w-2xl md:mx-auto text-center">
<h1
class="font-bold text-gray-700 text-xl sm:text-2xl md:text-5xl leading-tight mb-6"
>
A simple and smart tool that will help grow your business
</h1>
<p class="text-gray-600 md:text-xl md:px-18">
Lorem ipsum, dolor sit amet consectetur adipisicing elit hello.
</p>
<div
class="hidden md:block h-40 w-40 rounded-full bg-blue-800 absolute right-0 bottom-0 -mb-64 -mr-48"
></div>
<div
class="hidden md:block h-5 w-5 rounded-full bg-yellow-500 absolute top-0 right-0 -mr-40 mt-32"
></div>
</div>
</div>
<svg
class="fill-current bg-gray-200 text-white hidden md:block"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 1440 320"
>
<path
fill-opacity="1"
d="M0,64L120,85.3C240,107,480,149,720,149.3C960,149,1200,107,1320,85.3L1440,64L1440,320L1320,320C1200,320,960,320,720,320C480,320,240,320,120,320L0,320Z"
></path>
</svg>
</div>
<div
class="max-w-4xl mx-auto bg-white shadow-lg relative z-20 hidden md:block"
style="margin-top: -320px; border-radius: 20px;"
>
<div
class="h-20 w-20 rounded-full bg-yellow-500 absolute top-0 left-0 -ml-10 -mt-10"
style="z-index: -1;"
></div>
<div
class="h-5 w-5 rounded-full bg-blue-500 absolute top-0 left-0 -ml-32 mt-12"
style="z-index: -1;"
></div>
<div class="h-10 bg-white rounded-t-lg border-b border-gray-100"></div>
<div class="flex" style="height: 550px;">
<div class="w-32 bg-gray-200 p-6 overflow-hidden rounded-bl-lg">
<div class="text-center mb-10">
<div class="w-10 h-10 rounded-full bg-blue-800 mb-4 mx-auto"></div>
<div class="h-2 rounded-full bg-blue-800"></div>
</div>
<div class="text-center mb-10">
<div class="w-10 h-10 rounded-full bg-gray-300 mb-4 mx-auto"></div>
<div class="h-2 rounded-full bg-gray-300"></div>
</div>
<div class="text-center mb-10">
<div class="w-10 h-10 rounded-full bg-gray-300 mb-4 mx-auto"></div>
<div class="h-2 rounded-full bg-gray-300"></div>
</div>
<div class="text-center">
<div class="w-10 h-10 rounded-full bg-gray-300 mb-4 mx-auto"></div>
<div class="h-2 rounded-full bg-gray-300"></div>
</div>
</div>
<div class="flex-1 py-6 px-8">
<div class="flex flex-wrap -mx-4">
<div class="w-2/3 px-4">
<div class="flex flex-wrap -mx-4 mb-10">
<div class="w-1/4 px-4">
<div class="text-center mb-10 bg-white shadow rounded-lg p-6">
<div
class="w-10 h-10 rounded-full bg-green-600 mb-4 mx-auto"
></div>
<div class="h-2 rounded-full bg-gray-200"></div>
</div>
</div>
<div class="w-1/4 px-4">
<div class="text-center mb-10 bg-white shadow rounded-lg p-6">
<div
class="w-10 h-10 rounded-full bg-blue-600 mb-4 mx-auto"
></div>
<div class="h-2 rounded-full bg-gray-200"></div>
</div>
</div>
<div class="w-1/4 px-4">
<div class="text-center mb-10 bg-white shadow rounded-lg p-6">
<div
class="w-10 h-10 rounded-full bg-orange-400 mb-4 mx-auto"
></div>
<div class="h-2 rounded-full bg-gray-200"></div>
</div>
</div>
<div class="w-1/4 px-4">
<div class="text-center mb-10 bg-white shadow rounded-lg p-6">
<div
class="w-10 h-10 rounded-full bg-blue-800 mb-4 mx-auto"
></div>
<div class="h-2 rounded-full bg-gray-200"></div>
</div>
</div>
</div>
<div class="h-32 percentage mb-10 pt-2">
<div class="h-4 bg-gray-200 w-64 mb-4 block"></div>
<div class="h-4 bg-gray-200 w-32 mb-4 block"></div>
<div class="h-4 bg-gray-200 w-40 mb-4 block"></div>
<div class="h-4 bg-gray-200 w-20 mb-4 block"></div>
</div>
<div class="w-full flex flex-wrap mb-6">
<div class="w-1/2">
<div class="flex items-center">
<div class="h-8 w-8 rounded-full bg-gray-200 mr-4"></div>
<div>
<div class="h-2 w-16 bg-gray-200 mb-1 rounded-full"></div>
<div class="h-2 w-10 bg-gray-100 rounded-full"></div>
</div>
</div>
</div>
<div class="w-1/2">
<div class="flex items-center">
<div class="h-8 w-8 rounded-full bg-gray-200 mr-4"></div>
<div>
<div class="h-2 w-16 bg-gray-200 mb-1 rounded-full"></div>
<div class="h-2 w-10 bg-gray-100 rounded-full"></div>
</div>
</div>
</div>
</div>
<div class="w-full flex flex-wrap">
<div class="w-1/2">
<div class="flex items-center">
<div class="h-8 w-8 rounded-full bg-gray-200 mr-4"></div>
<div>
<div class="h-2 w-16 bg-gray-200 mb-1 rounded-full"></div>
<div class="h-2 w-10 bg-gray-100 rounded-full"></div>
</div>
</div>
</div>
<div class="w-1/2">
<div class="flex items-center">
<div class="h-8 w-8 rounded-full bg-gray-200 mr-4"></div>
<div>
<div class="h-2 w-16 bg-gray-200 mb-1 rounded-full"></div>
<div class="h-2 w-10 bg-gray-100 rounded-full"></div>
</div>
</div>
</div>
</div>
</div>
<div class="w-1/3 px-4">
<div class="rounded-lg shadow-lg p-6">
<div class="block w-12 h-2 rounded-full bg-gray-200 mb-6"></div>
<svg
height="150"
width="150"
viewBox="0 0 20 20"
class="mx-auto mb-12"
>
<circle r="10" cx="10" cy="10" fill="#4299e1" />
<circle
r="5"
cx="10"
cy="10"
fill="transparent"
stroke="#2b6cb0"
stroke-width="10"
stroke-dasharray="11 31.4"
transform="rotate(-90) translate(-20)"
/>
</svg>
<div class="flex flex-wrap -mx-2 mb-10">
<div class="w-1/3 px-2">
<div class="block h-2 rounded-full bg-gray-200"></div>
</div>
<div class="w-1/3 px-2">
<div class="block h-2 rounded-full bg-gray-200"></div>
</div>
<div class="w-1/3 px-2">
<div class="block h-2 rounded-full bg-gray-200"></div>
</div>
</div>
</div>
<div class="flex justify-between my-10">
<div>
<div class="h-2 w-10 bg-gray-300 rounded-full mb-2"></div>
<div class="h-2 w-16 bg-gray-300 rounded-full mb-2"></div>
<div class="h-2 w-8 bg-gray-300 rounded-full"></div>
</div>
<div>
<div
class="ml-auto h-2 w-5 bg-gray-300 rounded-full mb-2"
></div>
<div
class="ml-auto h-2 w-6 bg-gray-300 rounded-full mb-2"
></div>
<div class="ml-auto h-2 w-8 bg-gray-300 rounded-full"></div>
</div>
</div>
<div class="text-right flex justify-end">
<div class="rounded-lg h-8 w-20 px-4 bg-gray-200 mr-2"></div>
<div class="rounded-lg h-8 w-20 px-4 bg-green-400"></div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="px-4 md:hidden">
<div
class="-mt-10 max-w-4xl mx-auto bg-white shadow-lg relative z-20"
style="border-radius: 20px;"
>
<div class="h-10 bg-white rounded-t-lg border-b border-gray-100"></div>
<div class="flex" style="height: 340px;">
<div class="w-16 bg-gray-200 px-2 py-6 overflow-hidden rounded-bl-lg">
<div class="text-center mb-6">
<div class="w-4 h-4 rounded-full bg-blue-800 mb-2 mx-auto"></div>
<div class="h-2 w-8 mx-auto rounded-full bg-blue-800"></div>
</div>
<div class="text-center mb-6">
<div class="w-4 h-4 rounded-full bg-gray-300 mb-2 mx-auto"></div>
<div class="h-2 w-8 mx-auto rounded-full bg-gray-300"></div>
</div>
<div class="text-center mb-6">
<div class="w-4 h-4 rounded-full bg-gray-300 mb-2 mx-auto"></div>
<div class="h-2 w-8 mx-auto rounded-full bg-gray-300"></div>
</div>
<div class="text-center">
<div class="w-4 h-4 rounded-full bg-gray-300 mb-2 mx-auto"></div>
<div class="h-2 w-8 mx-auto rounded-full bg-gray-300"></div>
</div>
</div>
<div class="flex-1 py-6 px-4">
<div class="flex flex-wrap -mx-2">
<div class="w-1/3 px-2">
<div
class="text-center mb-6 bg-white shadow rounded-lg px-2 py-3"
>
<div
class="w-4 h-4 rounded-full bg-green-600 mb-2 mx-auto"
></div>
<div class="h-2 w-8 mx-auto rounded-full bg-gray-200"></div>
</div>
</div>
<div class="w-1/3 px-2">
<div
class="text-center mb-6 bg-white shadow rounded-lg px-2 py-3"
>
<div
class="w-4 h-4 rounded-full bg-blue-600 mb-2 mx-auto"
></div>
<div class="h-2 w-8 mx-auto rounded-full bg-gray-200"></div>
</div>
</div>
<div class="w-1/3 px-2">
<div
class="text-center mb-6 bg-white shadow rounded-lg px-2 py-3"
>
<div
class="w-4 h-4 rounded-full bg-orange-600 mb-2 mx-auto"
></div>
<div class="h-2 w-8 mx-auto rounded-full bg-gray-200"></div>
</div>
</div>
</div>
<div class="flex flex-wrap -mx-2 mb-6">
<div class="w-1/2 px-2">
<div class="shadow h-24 p-2 rounded-lg">
<div class="h-20 percentage pt-2">
<div class="h-2 bg-gray-200 w-24 mb-2 block"></div>
<div class="h-2 bg-gray-200 w-12 mb-2 block"></div>
<div class="h-2 bg-gray-200 w-20 mb-2 block"></div>
<div class="h-2 bg-gray-200 w-8 mb-2 block"></div>
</div>
</div>
</div>
<div class="w-1/2 px-2">
<div class="rounded-lg shadow px-2 py-2">
<div
class="block w-8 h-2 rounded-full bg-gray-200 mb-2"
></div>
<div class="mb-2">
<svg
height="50"
width="50"
viewBox="0 0 20 20"
class="mx-auto"
>
<circle r="10" cx="10" cy="10" fill="#ddd" />
<circle
r="5"
cx="10"
cy="10"
fill="transparent"
stroke="#eee"
stroke-width="10"
stroke-dasharray="11 31.4"
transform="rotate(-90) translate(-20)"
/>
</svg>
</div>
<div class="flex flex-wrap -mx-2">
<div class="w-1/3 px-2">
<div class="block h-2 rounded-full bg-gray-200"></div>
</div>
<div class="w-1/3 px-2">
<div class="block h-2 rounded-full bg-gray-200"></div>
</div>
<div class="w-1/3 px-2">
<div class="block h-2 rounded-full bg-gray-200"></div>
</div>
</div>
</div>
</div>
</div>
<div class="w-full flex flex-wrap mb-2">
<div class="w-1/2">
<div class="flex items-center">
<div class="h-4 w-4 rounded-full bg-gray-200 mr-4"></div>
<div>
<div class="h-2 w-10 bg-gray-200 mb-1 rounded-full"></div>
<div class="h-2 w-6 bg-gray-100 rounded-full"></div>
</div>
</div>
</div>
<div class="w-1/2">
<div class="flex items-center">
<div class="h-4 w-4 rounded-full bg-gray-200 mr-4"></div>
<div>
<div class="h-2 w-10 bg-gray-200 mb-1 rounded-full"></div>
<div class="h-2 w-6 bg-gray-100 rounded-full"></div>
</div>
</div>
</div>
</div>
<div class="w-full flex flex-wrap mb-6">
<div class="w-1/2">
<div class="flex items-center">
<div class="h-4 w-4 rounded-full bg-gray-200 mr-4"></div>
<div>
<div class="h-2 w-10 bg-gray-200 mb-1 rounded-full"></div>
<div class="h-2 w-6 bg-gray-100 rounded-full"></div>
</div>
</div>
</div>
<div class="w-1/2">
<div class="flex items-center">
<div class="h-4 w-4 rounded-full bg-gray-200 mr-4"></div>
<div>
<div class="h-2 w-10 bg-gray-200 mb-1 rounded-full"></div>
<div class="h-2 w-6 bg-gray-100 rounded-full"></div>
</div>
</div>
</div>
</div>
<div class="text-right flex justify-end">
<div class="rounded-lg h-6 w-16 px-4 bg-gray-200 mr-2"></div>
<div class="rounded-lg h-6 w-16 px-4 bg-green-400"></div>
</div>
</div>
</div>
</div>
</div>
<p class="text-center p-4 text-gray-600 mt-10">
Created by
<a
class="border-b text-blue-500"
href="https://twitter.com/mithicher"
target="_blank"
>@mithicher</a
>. Inspired by dribble shot
<a
href="https://dribbble.com/shots/8807920-Quickpay-Hero-section/attachments/1015863"
target="_blank"
class="border-b text-blue-500"
>https://dribbble.com/vadimdrut</a
>
</p>
</div>
</div>
How to create a Landing Page with Tailwind CSS with Tailwind CSS?
Install tailwind css of verion 1.0.4
Use the link
html tag to import the stylesheet of Tailwind CSS of the version 1.0.4
<link href=https://unpkg.com/[email protected]/dist/tailwind.min.css rel="stylesheet">
All the unility class needed to create a Landing Page with Tailwind CSS component
bg-white
flex
flex-col
min-h-screen
w-full
bg-gray-200
px-4
py-4
md:max-w-6xl
md:mx-auto
md:flex
inline-block
py-2
text-gray-800
text-2xl
hidden
md:block
py-1
md:py-4
text-gray-600
mr-6
text-gray-500
hover:text-gray-600
text-gray-700
hover:bg-gray-100
md:overflow-hidden
py-16
relative
md:max-w-2xl
text-center
text-xl
sm:text-2xl
md:text-5xl
mb-6
md:text-xl
md:px-18
h-40
w-40
bg-blue-800
absolute
right-0
bottom-0
-mb-64
-mr-48
h-5
w-5
bg-yellow-500
top-0
-mr-40
mt-32
text-white
max-w-4xl
mx-auto
z-20
h-20
w-20
left-0
-ml-10
-mt-10
bg-blue-500
-ml-32
mt-12
h-10
border-b
border-gray-100
w-32
p-6
overflow-hidden
mb-10
w-10
mb-4
h-2
bg-gray-300
flex-1
py-6
px-8
flex-wrap
-mx-4
w-2/3
w-1/4
bg-green-600
bg-blue-600
bg-orange-400
h-32
pt-2
h-4
w-64
block
w-1/2
h-8
w-8
mr-4
w-16
mb-1
bg-gray-100
w-1/3
w-12
mb-12
-mx-2
px-2
my-10
mb-2
ml-auto
w-6
text-right
mr-2
bg-green-400
md:hidden
w-4
py-3
bg-orange-600
h-24
p-2
w-24
h-6
p-4
mt-10
text-blue-500
118 steps to create a Landing Page with Tailwind CSS component with Tailwind CSS
Control the background color of an element to white using the
bg-white
utilities.Use
flex
to create a block-level flex container.Use
flex
to create a block-level flex container.Set the minimum width/height of an element using the
min-h-screen
utilities.Use
w-full
to set an element to a 100% based width.Control the background color of an element to gray-200 using the
bg-gray-200
utilities.Control the horizontal padding of an element to 1rem using the
px-4
utilities.Control the vertical padding of an element to 1rem using the
py-4
utilities.Set the maximum width/height of an element using the
md:max-w-6xl
utilities at only medium screen sizes.Control the horizontal margin of an element to auto at only medium screen sizes using the
md:mx-auto
utilities.Use
flex
to create a block-level flex container at only medium screen sizes.Use
inline-block
utilities to wrap the element to prevent the text inside from extending beyond its parent.Control the vertical padding of an element to 0.5rem using the
py-2
utilities.Control the text color of an element to gray-800 using the
text-gray-800
utilities.Control the text color of an element to 2xl using the
text-2xl
utilities.Use
hidden
to set an element to display: none and remove it from the page layout.Use
inline
utilities to put the element on its own line and fill its parent at only medium screen sizes.Control the vertical padding of an element to 0.25rem using the
py-1
utilities.Control the vertical padding of an element to 1rem at only medium screen sizes using the
md:py-4
utilities.Control the text color of an element to gray-600 using the
text-gray-600
utilities.Control the margin on right side of an element to 1.5rem using the
mr-6
utilities.Control the text color of an element to gray-500 using the
text-gray-500
utilities.Control the text color of an element to gray-600 on hover using the
hover:text-gray-600
utilities.Control the text color of an element to gray-700 using the
text-gray-700
utilities.Control the background color of an element to gray-100 using the
hover:bg-gray-100
utilities on hover.Use
overflow-hidden
to clip any content within an element that overflows the bounds of that element at only medium screen sizes.Control the vertical padding of an element to 4rem using the
py-16
utilities.Use
relative
to position an element according to the normal flow of the document.Set the maximum width/height of an element using the
md:max-w-2xl
utilities at only medium screen sizes.Control the text color of an element to center using the
text-center
utilities.Control the text color of an element to xl using the
text-xl
utilities.Control the text color of an element to 2xl at only small screen sizes using the
sm:text-2xl
utilities.Control the text color of an element to 5xl at only medium screen sizes using the
md:text-5xl
utilities.Control the margin on bottom side of an element to 1.5rem using the
mb-6
utilities.Control the text color of an element to xl at only medium screen sizes using the
md:text-xl
utilities.Control the horizontal padding of an element to 4.5rem at only medium screen sizes using the
md:px-18
utilities.Use
h-40
to set an element to a fixed height(10rem).Use
w-40
to set an element to a fixed width(10rem).Control the background color of an element to blue-800 using the
bg-blue-800
utilities.Use
absolute
to position an element outside of the normal flow of the document, causing neighboring elements to act as if the element doesn’t exist.Use the
right-0
utilities to set the right position of a positioned element to 0rem.Use the
bottom-0
utilities to set the bottom position of a positioned element to 0rem.Control the margin on bottom side of an element to -16rem using the
-mb-64
utilities.Control the margin on right side of an element to -12rem using the
-mr-48
utilities.Use
h-5
to set an element to a fixed height(1.25rem).Use
w-5
to set an element to a fixed width(1.25rem).Control the background color of an element to yellow-500 using the
bg-yellow-500
utilities.Use the
top-0
utilities to set the top position of a positioned element to 0rem.Control the margin on right side of an element to -10rem using the
-mr-40
utilities.Control the margin on top side of an element to 8rem using the
mt-32
utilities.Control the text color of an element to white using the
text-white
utilities.Set the maximum width/height of an element using the
max-w-4xl
utilities.Control the horizontal margin of an element to auto using the
mx-auto
utilities.Control the stack order (or three-dimensional positioning) of an element to 20 in Tailwind, regardless of order it has been displayed, using the
z-20
utilities.Use
h-20
to set an element to a fixed height(5rem).Use
w-20
to set an element to a fixed width(5rem).Use the
left-0
utilities to set the left position of a positioned element to 0rem.Control the margin on left side of an element to -2.5rem using the
-ml-10
utilities.Control the margin on top side of an element to -2.5rem using the
-mt-10
utilities.Control the background color of an element to blue-500 using the
bg-blue-500
utilities.Control the margin on left side of an element to -8rem using the
-ml-32
utilities.Control the margin on top side of an element to 3rem using the
mt-12
utilities.Use
h-10
to set an element to a fixed height(2.5rem).Control the border color of an element to b using the
border-b
utilities.Control the border color of an element to gray-100 using the
border-gray-100
utilities.Use
w-32
to set an element to a fixed width(8rem).Control the padding on all sides of an element to 1.5rem using the
p-6
utilities.Use
overflow-hidden
to clip any content within an element that overflows the bounds of that element.Control the margin on bottom side of an element to 2.5rem using the
mb-10
utilities.Use
w-10
to set an element to a fixed width(2.5rem).Control the margin on bottom side of an element to 1rem using the
mb-4
utilities.Use
h-2
to set an element to a fixed height(0.5rem).Control the background color of an element to gray-300 using the
bg-gray-300
utilities.Use
flex
to create a block-level flex container.Control the vertical padding of an element to 1.5rem using the
py-6
utilities.Control the horizontal padding of an element to 2rem using the
px-8
utilities.Use
flex
to create a block-level flex container.Control the horizontal margin of an element to -1rem using the
-mx-4
utilities.Use
w-2/3
to set an element to a fixed width(2/3).Use
w-1/4
to set an element to a fixed width(1/4).Control the background color of an element to green-600 using the
bg-green-600
utilities.Control the background color of an element to blue-600 using the
bg-blue-600
utilities.Control the background color of an element to orange-400 using the
bg-orange-400
utilities.Use
h-32
to set an element to a fixed height(8rem).Control the padding on top side of an element to 0.5rem using the
pt-2
utilities.Use
h-4
to set an element to a fixed height(1rem).Use
w-64
to set an element to a fixed width(16rem).Use
inline
utilities to put the element on its own line and fill its parent.Use
w-1/2
to set an element to a fixed width(1/2).Use
h-8
to set an element to a fixed height(2rem).Use
w-8
to set an element to a fixed width(2rem).Control the margin on right side of an element to 1rem using the
mr-4
utilities.Use
w-16
to set an element to a fixed width(4rem).Control the margin on bottom side of an element to 0.25rem using the
mb-1
utilities.Control the background color of an element to gray-100 using the
bg-gray-100
utilities.Use
w-1/3
to set an element to a fixed width(1/3).Use
w-12
to set an element to a fixed width(3rem).Control the margin on bottom side of an element to 3rem using the
mb-12
utilities.Control the horizontal margin of an element to -0.5rem using the
-mx-2
utilities.Control the horizontal padding of an element to 0.5rem using the
px-2
utilities.Control the vertical margin of an element to 2.5rem using the
my-10
utilities.Control the margin on bottom side of an element to 0.5rem using the
mb-2
utilities.Control the margin on left side of an element to auto using the
ml-auto
utilities.Use
w-6
to set an element to a fixed width(1.5rem).Control the text color of an element to right using the
text-right
utilities.Control the margin on right side of an element to 0.5rem using the
mr-2
utilities.Control the background color of an element to green-400 using the
bg-green-400
utilities.Use
hidden
to set an element to display: none and remove it from the page layout at only medium screen sizes.Use
w-4
to set an element to a fixed width(1rem).Control the vertical padding of an element to 0.75rem using the
py-3
utilities.Control the background color of an element to orange-600 using the
bg-orange-600
utilities.Use
h-24
to set an element to a fixed height(6rem).Control the padding on all sides of an element to 0.5rem using the
p-2
utilities.Use
w-24
to set an element to a fixed width(6rem).Use
h-6
to set an element to a fixed height(1.5rem).Control the padding on all sides of an element to 1rem using the
p-4
utilities.Control the margin on top side of an element to 2.5rem using the
mt-10
utilities.Control the text color of an element to blue-500 using the
text-blue-500
utilities.
Conclusion
The above is a step-by-step tutorial on how to use Tailwind CSS to create a Landing Page with Tailwind CSS components, learn and follow along to implement your own components.