tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

option-checked-styling.html (613B)


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