Volver
Ctrl+Space
◑
Copiar
Descargar
Restaurar
Ejecutar
Ctrl+Enter
<!DOCTYPE html> <html lang="es"> <head> <meta charset="UTF-8"> <title>Gradientes CSS</title> <style> body { font-family: Arial, sans-serif; padding: 20px; background-color: #f9fafb; } h1 { color: #111827; } h2 { color: #374151; margin: 24px 0 10px; font-size: 16px; } .caja { height: 80px; border-radius: 8px; margin-bottom: 8px; display: flex; align-items: center; justify-content: center; color: white; font-size: 13px; font-weight: bold; text-shadow: 0 1px 3px rgba(0,0,0,.4); } .g1 { background: linear-gradient(to right, #667eea, #764ba2); } .g2 { background: linear-gradient(to bottom, #f093fb, #f5576c); } .g3 { background: linear-gradient(135deg, #0f2027, #203a43, #2c5364); } .g4 { background: linear-gradient(to right, #ff0000, #ff7700, #ffff00, #00ff00, #0000ff, #8b00ff); } .g5 { background: linear-gradient(to right, #4facfe, #00f2fe); } .g6 { background: linear-gradient(135deg, #f5f7fa, #c3cfe2); color: #374151; text-shadow: none; } </style> </head> <body> <h1>Gradientes en CSS</h1> <h2>to right — izquierda a derecha</h2> <div class="caja g1">linear-gradient(to right, #667eea, #764ba2)</div> <h2>to bottom — arriba a abajo</h2> <div class="caja g2">linear-gradient(to bottom, #f093fb, #f5576c)</div> <h2>135deg — diagonal</h2> <div class="caja g3">linear-gradient(135deg, #0f2027, #203a43, #2c5364)</div> <h2>Múltiples colores</h2> <div class="caja g4">linear-gradient(to right, rojo, naranja, amarillo, verde, azul, violeta)</div> <h2>Celeste suave</h2> <div class="caja g5">linear-gradient(to right, #4facfe, #00f2fe)</div> <h2>Gris claro — para fondos sutiles</h2> <div class="caja g6">linear-gradient(135deg, #f5f7fa, #c3cfe2)</div> </body> </html>