<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<style>
form {
display:inline-block;
border: 1px solid #2d98da;
color: #000000;
padding: 20px;
}
form label {
float:left;
margin:5px;
}
form input {
float:right;
margin:5px;
}
form:focus-within {
background: #f7b731;
color: #a00;
}
</style>
</head>
<body>
<div class="focus-within">
<form>
<label for="nombre">Nombre:</label><input id="nombre" name="nombre" type="text" /> <br />
<label for="apellidos">Apellidos:</label><input id="apellidos" name="apellidos" type="text" />
</form>
</div>
</body>
</html>
Comentarios sobre la versión: 1 (0)
No hay comentarios