Esta clase acepta más de un valor en Tailwind CSS. Todas las propiedades están cubiertas como en forma de clase. Es la alternativa a la propiedad clear de CSS . Esta clase se usa para especificar qué lado de los elementos flotantes no pueden flotar. Establece o devuelve la posición del elemento en relación con los objetos flotantes. Si el elemento puede caber horizontalmente en el espacio junto a otro elemento que flota, lo hará. Básicamente, se utiliza para controlar la envoltura de contenido alrededor de un elemento.
Clases claras de CSS:
- claro a la izquierda
- bien claro
- Limpia los dos
- claro-ninguno
clear-left: esta clase se usa para especificar que los elementos no pueden flotar en el lado izquierdo en relación con otro elemento.
Sintaxis:
<element class="clear-left">...</element>
Ejemplo:
HTML
<!DOCTYPE html> <head> <link href= "https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet"> </head> <body class="text-center"> <center> <h1 class="text-green-600 text-5xl font-bold"> GeeksforGeeks </h1> <b>Tailwind CSS clear Class</b> <div class="mx-10"> <img class="float-left p-2 w-20 h-20" src= "https://media.geeksforgeeks.org/wp-content/uploads/20190807114330/GFG115.png"> <img class="float-right p-2" src= "https://media.geeksforgeeks.org/wp-content/uploads/20190807114330/GFG115.png"> <p class="text-justify clear-left"> How many times were you frustrated while looking out for a good collection of programming/algorithm/interview questions? What did you expect and what did you get? This portal has been created to provide well written, well thought and well explained solutions for selected questions. An IIT Roorkee alumnus and founder of GeeksforGeeks. He loves to solve programming problems in most efficient ways. Apart from GeeksforGeeks, he has worked with DE Shaw and Co. as a software developer and JIIT Noida as an assistant professor.It is a good platform to learn programming. It is an educational website. Prepare for the Recruitment drive of product based companies like Microsoft, Amazon, Adobe etc with a free online placement preparation course.</p> </center> </body> </html>
Producción:
clear-right: esta clase se usa para especificar que los elementos no pueden flotar en el lado derecho en relación con otro elemento.
Sintaxis:
<element class="clear-right">...</element>
Ejemplo:
HTML
<!DOCTYPE html> <head> <link href= "https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet"> </head> <body class="text-center"> <center> <h1 class="text-green-600 text-5xl font-bold"> GeeksforGeeks </h1> <b>Tailwind CSS clear Class</b> <div class="mx-10"> <img class="float-left p-2 w-20 h-20" src= "https://media.geeksforgeeks.org/wp-content/uploads/20190807114330/GFG115.png"> <img class="float-right p-2" src= "https://media.geeksforgeeks.org/wp-content/uploads/20190807114330/GFG115.png"> <p class="text-justify clear-right"> How many times were you frustrated while looking out for a good collection of programming/algorithm/interview questions? What did you expect and what did you get? This portal has been created to provide well written, well thought and well explained solutions for selected questions. An IIT Roorkee alumnus and founder of GeeksforGeeks. He loves to solve programming problems in most efficient ways. Apart from GeeksforGeeks, he has worked with DE Shaw and Co. as a software developer and JIIT Noida as an assistant professor.It is a good platform to learn programming. It is an educational website. Prepare for the Recruitment drive of product based companies like Microsoft, Amazon, Adobe etc with a free online placement preparation course.</p> </center> </body> </html>
Producción:
clear-both: esta clase solía especificar que los elementos flotantes no pueden flotar en ambos lados.
Sintaxis:
<element class="clear-both">...</element>
Ejemplo:
HTML
<!DOCTYPE html> <head> <link href= "https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet"> </head> <body class="text-center"> <center> <h1 class="text-green-600 text-5xl font-bold"> GeeksforGeeks </h1> <b>Tailwind CSS clear Class</b> <div class="mx-10"> <img class="float-left p-2 w-20 h-20" src= "https://media.geeksforgeeks.org/wp-content/uploads/20190807114330/GFG115.png"> <img class="float-right p-2" src= "https://media.geeksforgeeks.org/wp-content/uploads/20190807114330/GFG115.png"> <p class="text-justify clear-both"> How many times were you frustrated while looking out for a good collection of programming/algorithm/interview questions? What did you expect and what did you get? This portal has been created to provide well written, well thought and well explained solutions for selected questions. An IIT Roorkee alumnus and founder of GeeksforGeeks. He loves to solve programming problems in most efficient ways. Apart from GeeksforGeeks, he has worked with DE Shaw and Co. as a software developer and JIIT Noida as an assistant professor.It is a good platform to learn programming. It is an educational website. Prepare for the Recruitment drive of product based companies like Microsoft, Amazon, Adobe etc with a free online placement preparation course.</p> </center> </body> </html>
Producción:
clear-none: esta clase se utiliza para especificar el valor predeterminado. Permite que los elementos floten en ambos lados.
Sintaxis:
<element class="clear-none">...</element>
Ejemplo:
HTML
<!DOCTYPE html> <head> <link href= "https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet"> </head> <body class="text-center"> <center> <h1 class="text-green-600 text-5xl font-bold"> GeeksforGeeks </h1> <b>Tailwind CSS clear Class</b> <div class="mx-10"> <img class="float-left p-2 w-20 h-20" src= "https://media.geeksforgeeks.org/wp-content/uploads/20190807114330/GFG115.png"> <img class="float-right p-2" src= "https://media.geeksforgeeks.org/wp-content/uploads/20190807114330/GFG115.png"> <p class="text-justify clear-none"> How many times were you frustrated while looking out for a good collection of programming/algorithm/interview questions? What did you expect and what did you get? This portal has been created to provide well written, well thought and well explained solutions for selected questions. An IIT Roorkee alumnus and founder of GeeksforGeeks. He loves to solve programming problems in most efficient ways. Apart from GeeksforGeeks, he has worked with DE Shaw and Co. as a software developer and JIIT Noida as an assistant professor.It is a good platform to learn programming. It is an educational website. Prepare for the Recruitment drive of product based companies like Microsoft, Amazon, Adobe etc with a free online placement preparation course.</p> </center> </body> </html>
Producción:
Publicación traducida automáticamente
Artículo escrito por skyridetim y traducido por Barcelona Geeks. The original can be accessed here. Licence: CCBY-SA