Ver ❯
Herramientas SEO
Tamaño del resultado:
668 x 574
×
Cambiar Orientacion
Cambiar tema, Oscuro/Luz
<!doctype html> <html lang="es"> <head> <meta charset="utf-8"> <title>Trucos y efectos de CSS3 - Tutoriales En Linea</title> </head> <body> <style> main { width: 100%; height: 229px; display: flex; } label { margin: auto; } input { display: block; width: 229px; padding: .8em; outline: none; border: 1px solid #e3e3e3; border-radius: 3px; } input:focus, input:hover { border-color: #b4a078; } input:not(:placeholder-shown) { border-color: #be4141; box-shadow: 0 0 0 2px rgba(255, 100, 97, 0.2); } input:not(:placeholder-shown) + .poptip { color: #be4141; } input:valid { border-color: #b4a078; box-shadow: 0 0 0 2px rgba(180, 160, 120, 0.2); } input:valid + .poptip { color: unset; } input:not(:focus) + .poptip { transform: scale(0); transition: transform .25s cubic-bezier(.25, .1, .25, .1); } input:focus + .poptip { transform: scale(1); transition: transform .4s cubic-bezier(.29, .15, .5, 1.46); } .poptip { display: inline-block; width: 236px; font-size: 13px; padding: .6em; background: #fafafa; position: relative; margin-left: -3px; margin-top: 3px; border-radius: 2px; filter: drop-shadow(0 0 1px rgba(0, 0, 0, .23456)); transform-origin: 15px -6px; } .poptip::before { content: ""; position: absolute; top: -6px; left: 10px; border: 9px solid transparent; border-bottom-color: #fafafa; border-top-width: 0; } </style> <main class="main"> <label> <input required type="text" id="name" autocomplete="off" placeholder="Por favor ingrese algo" pattern="^\w+$"/> <span class="poptip">¡Solo se iten las letras, los números y las combinaciones de subrayado!</span> </label> </main> </body> </html>