problem with <select> and :after with CSS in WebKit

后端 未结 9 607
无人及你
无人及你 2020-11-27 04:59

I would like to add some style on a select box with the pseudo :after (to style my select box with 2 parts and without images). Here\'s the HTML:


                        
    
提交评论

  • 2020-11-27 05:56

    I haven't checked this extensively, but I'm under the impression that this isn't (yet?) possible, due to the way in which select elements are generated by the OS on which the browser runs, rather than the browser itself.

    0 讨论(0)
  • 2020-11-27 05:56

    Faced the same problem. Probably it could be a solution:

    <select id="select-1">
        <option>One</option>
        <option>Two</option>
        <option>Three</option>
    </select>
    <label for="select-1"></label>
    
    #select-1 {
        ...
    }
    
    #select-1 + label:after {
        ...
    }
    
    0 讨论(0)
  • 提交回复
    热议问题