1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
| <html>
<head>
<title>test</title>
<style type="text/css">
/* définition du style de la police, et largeur du select */
select {
font-family : Courier ;
font-size : 10px ;
width : 200px ;
}
/* élément de couleur bleu */
option.bleu {
color : #0000FF ;
background-color : #00CCFF ;
font-weight: bolder;
}
/* élément de couleur violet */
option.violet {
color : #9900FF ;
background-color : #99CCFF ;
}
.testGras
{
font-weight: bolder;
}
</style>
</head>
<body>
<div>
<select>
<option>Option normale 1</option>
<option class="testGras">Option avec class="testGras"</option>
<option>Option normale 2</option>
</select>
</div>
<div>
<select name="monselect">
<option value="1" class="bleu">un</option>
<option value="2" class="violet">deux</option>
<option value="3" class="bleu">trois</option>
<option value="4" class="violet" selected>quatre</option>
</select>
</div>
</body>
</html> |
Partager