Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

Tailwind CSS Installation (CDN)

Tailwind CSS Installation (CDN)

If you just want a simple experience, you can directly include the CDN link:

Use the CDN library provided by the official website, at the following address:

Use jsDelivr's CDN library, at the following address:

<link href="https://cdn.jsdelivr.net/npm/tailwindcss@3.3.0/dist/tailwind.min.css" rel="stylesheet">

Use it this way:

Usage Example

The following example outputs Hello, world!

Example

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content=">

width=device-width, initial-scale=1.0

"

<script src="https://cdn.tailwindcss.com" script head>
<body>
<h1 class=">

text-3xl font-bold underline

"

Hello world!

h1

body

html

Try it »

Edit the tailwind.config object to define your own configuration information:

Example

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content=">

width=device-width, initial-scale=1.0

"

<script src="https://cdn.tailwindcss.com" script>
<script>

tailwind.config = { theme: { extend: { colors: { clifford: '#da373d', } } } }

script

head

<body>
<h1 class=">

text-3xl font-bold underline text-clifford

"

Hello world!

h1

body

html

Try it »

Use type="text/tailwindcss" to add custom CSS:

Example

 

 

 

 

 

   

 

Use the plugins parameter to set the plugins to use, such as forms and typography:

Example