<div class="control">
<label for="language_select">语言(select):</label>
<select name="language_select" id="language_select">
<option disabled selected value="">选择你喜欢的语言</option>
<option value="CSS">CSS</option>
<option value="HTML">HTTML</option>
<option value="JavaScript">JavaScript</option>
<option value="React">React</option>
<option value="Vue">Vue</option>
</select>
</div>
<span>VS.</span>
<div class="control">
<label for="language_datalist">语言(datalist):</label>
<input type="text" id="language_datalist" list="language_list" placeholder="选择你喜欢的语言">
<datalist id="language_list">
<option value="CSS">CSS</option>
<option value="HTML">HTTML</option>
<option value="JavaScript">JavaScript</option>
<option value="React">React</option>
<option value="Vue">Vue</option>
</datalist>
</div>
@import url("https://fonts.googleapis.com/css?family=Gochi+Hand");
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
margin: 0;
padding: 0;
background-color: #291642;
font-family: "Gochi Hand", sans-serif;
color: #fff;
font-size: 130%;
letter-spacing: 0.1rem;
display: flex;
align-items: center;
justify-content: center;
width: 100vw;
min-height: 100vh;
}
span {
margin: 0 8vh;
font-size: 20vh;
color: #f36;
text-shadow: 1px 1px 3px hsl(0.8turn, 90%, 50%);
}
label {
display: block;
margin-bottom: 2vh;
}
View Compiled
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.