<div class="wrap">
<input list="colores" name="colores" type="text" placeholder="Elige un color">
<datalist id="colores">
<option value="Azul"></option>
<option value="Amarillo"></option>
<option value="Burdeos"></option>
<option value="Caoba"></option>
<option value="Marrón"></option>
<option value="Naranja"></option>
<option value="Verde"></option>
</datalist>
</div>
body {
font-family: sans-serif;
font-size: 16px;
line-height: 1.5;
background: #eee;
}
.wrap {
width: 80%;
margin: 1em auto;
padding: 1em 5%;
background: #fff;
}
h1, h2 {
margin-bottom: .5em;
}
h1 {
font-size: 2em;
}
h2 {
font-size: 1.6em;
}
p {
margin-bottom: 1em;
}
input {
width: 300px;
height: 40px;
border: 2px solid #ccc;
line-height: 40px;
font-family: Verdana;
font-size: 16px;
color: #333;
padding: 5px;
}
input:focus {
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset, 0 0 8px rgba(102, 175, 233, 0.6);
border-color: rgb(102, 175, 233);
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.