我有以下代码示例:
<label>
Enter your favorite cartoon character:<br />
<input type="text" name="favCharacter" list="characters" maxlength="50" style="width:95%;">
<datalist id="characters">
<option value="Homer Simpson">
<option value="Bart">
<option value="Fred Flinstone">
</datalist>
</label>
有没有可能给“Bart”选项添加样式,比如用 style="color: yellow" 将其涂成黄色?