blob: 216b03a88a3dc703cad5d293bf2554650de1bf77 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
<!DOCTYPE html>
<meta charset="utf-8">
<title>Stylability of select>option with :checked pseudo</title>
<link rel="author" href="mailto:masonf@chromium.org">
<link rel="help" href="https://html.spec.whatwg.org/multipage/form-elements.html#the-select-element">
<link rel="match" href="option-checked-styling-ref.html">
<style>
option {
color: black;
background-color: red;
}
option:checked {
background: green;
}
</style>
<select id=select size=3 multiple>
<option id=option1 selected>Option #1 (should be green)</option>
<option id=option2>Option #2 (should be red)</option>
</select>
|