HTML CSS examples for CSS Form:input
Change translate Y of element on input focus
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> input.wpcf7-text:focus + span { display:inline-block; -webkit-transform:translateY(-26px); -ms-transform:translateY(-26px); transform:translateY(-26px); } </style> <!--from ww w . j a v a 2 s. c o m--> </head> <body> <div class="theInput"> <input type="text" name="your-name" value="" size="40" class="wpcf7-form-control wpcf7-text wpcf7-validates-as-required effectForm" aria-required="true" aria-invalid="false"> <span class="theLabel" id="your-name">Lore</span> </div> </body> </html>