Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Aprende Challenge: Styling Buttons | Building Basic Components
Tailwind CSS for Web Development

bookChallenge: Styling Buttons

Task

Using Tailwind CSS, create a button that meets the following requirements:

  1. The button should have a blue background (e.g. bg-blue-500);
  2. When hovered over, the background color should change to a darker shade of blue (e.g. bg-blue-700);
  3. When focused, the button should have a yellow background color (e.g., bg-yellow-500);
  4. When active (pressed), the background color should change to an even darker shade of blue (e.g. bg-blue-900);
  5. When disabled, the button should appear with 50% opacity and a cursor that indicates it is not clickable.
index.html

index.html

copy
  • Use hover:bg-blue-700 for hover state;
  • Use focus:bg-yellow-500 for focus state;
  • Use active:bg-blue-900 for active state;
  • Use opacity-50 cursor-not-allowed for disabled state.
index.html

index.html

copy

¿Todo estuvo claro?

¿Cómo podemos mejorarlo?

¡Gracias por tus comentarios!

Sección 3. Capítulo 2

Pregunte a AI

expand

Pregunte a AI

ChatGPT

Pregunte lo que quiera o pruebe una de las preguntas sugeridas para comenzar nuestra charla

Awesome!

Completion rate improved to 3.57

bookChallenge: Styling Buttons

Desliza para mostrar el menú

Task

Using Tailwind CSS, create a button that meets the following requirements:

  1. The button should have a blue background (e.g. bg-blue-500);
  2. When hovered over, the background color should change to a darker shade of blue (e.g. bg-blue-700);
  3. When focused, the button should have a yellow background color (e.g., bg-yellow-500);
  4. When active (pressed), the background color should change to an even darker shade of blue (e.g. bg-blue-900);
  5. When disabled, the button should appear with 50% opacity and a cursor that indicates it is not clickable.
index.html

index.html

copy
  • Use hover:bg-blue-700 for hover state;
  • Use focus:bg-yellow-500 for focus state;
  • Use active:bg-blue-900 for active state;
  • Use opacity-50 cursor-not-allowed for disabled state.
index.html

index.html

copy

¿Todo estuvo claro?

¿Cómo podemos mejorarlo?

¡Gracias por tus comentarios!

Sección 3. Capítulo 2
some-alt