| <!DOCTYPE html> |
| <html> |
| <head> |
| <style type="text/css"> |
| select { |
| width: 100px; |
| height:100px; |
| font-family: sans-serif; |
| font-size: 12px; |
| border: 1px solid black; |
| box-sizing: border-box; |
| } |
| #cover { |
| position: absolute; |
| width: 100px; |
| height:300px; |
| background-color: black; |
| left: 80px; |
| top: 0px; |
| } |
| .red { color: red; } |
| </style> |
| </head> |
| <body> |
| <select size="4"> |
| <option>One</option> |
| <option class=red>Two</option> |
| </select><br><select size="4"> |
| <optgroup label="Optgroup1"></optgroup> |
| <optgroup label="Optgroup2" class=red></optgroup> |
| </select> |
| <div id=cover></div> |
| </body> |
| </html> |