Search
 
SCRIPT & CODE EXAMPLE
 

HTML

Tailwind CSS floating label

<div class="relative">
    <input type="text" id="floating_filled" class="block rounded-t-lg px-2.5 pb-2.5 pt-5 w-full text-sm text-gray-900 bg-gray-50 dark:bg-gray-700 border-0 border-b-2 border-gray-300 appearance-none dark:text-white dark:border-gray-600 dark:focus:border-blue-500 focus:outline-none focus:ring-0 focus:border-blue-600 peer" placeholder=" " />
    <label for="floating_filled" class="absolute text-sm text-gray-500 dark:text-gray-400 duration-300 transform -translate-y-4 scale-75 top-4 z-10 origin-[0] left-2.5 peer-focus:text-blue-600 peer-focus:dark:text-blue-500 peer-placeholder-shown:scale-100 peer-placeholder-shown:translate-y-0 peer-focus:scale-75 peer-focus:-translate-y-4">Floating filled</label>
</div>
<div class="relative">
    <input type="text" id="floating_outlined" class="block px-2.5 pb-2.5 pt-4 w-full text-sm text-gray-900 bg-transparent rounded-lg border-1 border-gray-300 appearance-none dark:text-white dark:border-gray-600 dark:focus:border-blue-500 focus:outline-none focus:ring-0 focus:border-blue-600 peer" placeholder=" " />
    <label for="floating_outlined" class="absolute text-sm text-gray-500 dark:text-gray-400 duration-300 transform -translate-y-4 scale-75 top-2 z-10 origin-[0] bg-white dark:bg-gray-800 px-2 peer-focus:px-2 peer-focus:text-blue-600 peer-focus:dark:text-blue-500 peer-placeholder-shown:scale-100 peer-placeholder-shown:-translate-y-1/2 peer-placeholder-shown:top-1/2 peer-focus:top-2 peer-focus:scale-75 peer-focus:-translate-y-4 left-1">Floating outlined</label>
</div>
<div class="relative z-0">
    <input type="text" id="floating_standard" class="block py-2.5 px-0 w-full text-sm text-gray-900 bg-transparent border-0 border-b-2 border-gray-300 appearance-none dark:text-white dark:border-gray-600 dark:focus:border-blue-500 focus:outline-none focus:ring-0 focus:border-blue-600 peer" placeholder=" " />
    <label for="floating_standard" class="absolute text-sm text-gray-500 dark:text-gray-400 duration-300 transform -translate-y-6 scale-75 top-3 -z-10 origin-[0] peer-focus:left-0 peer-focus:text-blue-600 peer-focus:dark:text-blue-500 peer-placeholder-shown:scale-100 peer-placeholder-shown:translate-y-0 peer-focus:scale-75 peer-focus:-translate-y-6">Floating standard</label>
</div>
Comment

PREVIOUS NEXT
Code Example
Html :: color picker js 
Html :: html new line without <br 
Html :: html drag and drop 
Html :: font awesome react color 
Html :: Serve images in nextgen formats webp 
Html :: best html emmet extension for vs code 
Html :: a tag download csv save download 
Html :: how to put a name on a fieldset 
Html :: wright word with < in html p tag 
Html :: tailwind css forms 
Html :: bookmarks manager 
Html :: alpine hide element after set time 
Html :: how do i link back out a folder using th a-href tag 
Html :: react render 
Html :: how to change color while hovering a button html 
Html :: lorem ipsum generator 
Html :: input type checkbox and hide checkbox 
Html :: how to make text in html 
Html :: html work with path 
Html :: Font Awesome icons html code 
Html :: how to resize all images in a class html 
Html :: bootstrap sweetalert 
Html :: how to call html.action in asp.net core 
Html :: Simple random code generator 
Html :: search button inside search box 
Html :: slider input 
Html :: put the text in the end of navbar collapse 
Html :: nunjucks loop n times 
Html :: html entity close x 
Html :: execute vue ui 
ADD CONTENT
Topic
Content
Source link
Name
2+1 =