•  


Installation - Tailwind CSS

Installing Tailwind CLI

The simplest and fastest way to get up and running with Tailwind CSS from scratch is with the Tailwind CLI tool. The CLI is also available as a standalone executable if you want to use it without installing Node.js.

  1. Install Tailwind CSS

    Install tailwindcss via npm, and create your tailwind.config.js file.

    Terminal
    npm install -D tailwindcss
    npx tailwindcss init
    
  2. Configure your template paths

    Add the paths to all of your template files in your tailwind.config.js file.

    tailwind.config.js
    /** 
    @type
     {
    import
    (
    'tailwindcss'
    )
    .
    Config
    }
     */
    
    module
    .
    exports
     =
     {
    
      content
    :
     [
    "./src/**/*.{html,js}"
    ]
    ,
    
      theme
    :
     {
    
        extend
    :
     {
    }
    ,
    
      }
    ,
    
      plugins
    :
     [
    ]
    ,
    
    }
    
    
  3. Add the Tailwind directives to your CSS

    Add the @tailwind directives for each of Tailwind’s layers to your main CSS file.

    src/input.css
    @tailwind
     base
    ;
    
    @tailwind
     components
    ;
    
    @tailwind
     utilities
    ;
    
  4. Start the Tailwind CLI build process

    Run the CLI tool to scan your template files for classes and build your CSS.

    Terminal
    npx tailwindcss -i ./src/input.css -o ./src/output.css --watch
    
  5. Start using Tailwind in your HTML

    Add your compiled CSS file to the <head> and start using Tailwind’s utility classes to style your content.

    src/index.html
    <!
    doctype
     html
    >
    
    <
    html
    >
    
    <
    head
    >
    
      <
    meta
     charset
    =
    "
    UTF-8
    "
    >
    
      <
    meta
     name
    =
    "
    viewport
    "
     content
    =
    "
    width=device-width, initial-scale=1.0
    "
    >
    
      <
    link
     href
    =
    "
    ./output.css
    "
     rel
    =
    "
    stylesheet
    "
    >
    
    </
    head
    >
    
    <
    body
    >
    
      <
    h1
     class
    =
    "
    text-3xl font-bold underline
    "
    >
    
        Hello world!
      </
    h1
    >
    
    </
    body
    >
    
    </
    html
    >
    
    

What to read next

Get familiar with some of the core concepts that make Tailwind CSS different from writing traditional CSS.

  • Utility-First Fundamentals

    Using a utility-first workflow to build complex components from a constrained set of primitive utilities.

  • Responsive Design

    Build fully responsive user interfaces that adapt to any screen size using responsive modifiers.

  • Hover, Focus & Other States

    Style elements in interactive states like hover, focus, and more using conditional modifiers.

  • Dark Mode

    Optimize your site for dark mode directly in your HTML using the dark mode modifier.

  • Reusing Styles

    Manage duplication and keep your projects maintainable by creating reusable abstractions.

  • Customizing the Framework

    Customize the framework to match your brand and extend it with your own custom styles.

- "漢字路" 한글한자자동변환 서비스는 교육부 고전문헌국역지원사업의 지원으로 구축되었습니다.
- "漢字路" 한글한자자동변환 서비스는 전통문화연구회 "울산대학교한국어처리연구실 옥철영(IT융합전공)교수팀"에서 개발한 한글한자자동변환기를 바탕하여 지속적으로 공동 연구 개발하고 있는 서비스입니다.
- 현재 고유명사(인명, 지명등)을 비롯한 여러 변환오류가 있으며 이를 해결하고자 많은 연구 개발을 진행하고자 하고 있습니다. 이를 인지하시고 다른 곳에서 인용시 한자 변환 결과를 한번 더 검토하시고 사용해 주시기 바랍니다.
- 변환오류 및 건의,문의사항은 juntong@juntong.or.kr로 메일로 보내주시면 감사하겠습니다. .
Copyright ⓒ 2020 By '전통문화연구회(傳統文化硏究會)' All Rights reserved.
 한국   대만   중국   일본