CSS3 TextArea Highlight Color

后端 未结 1 1152
清酒与你
清酒与你 2021-01-02 17:46

I\'ve been using the following CSS3 option to change the highlight color of text on a webpage. However, the only element on the webpage is a textarea, and the following CSS

1条回答
  •  醉梦人生
    2021-01-02 17:46

    Try using the vendor extension versions -moz-selection and -webkit-selection:

    ::selection { background:#B9B9B9; color:#000000; }
    ::-moz-selection { background:#B9B9B9; color:#000000; }
    ::-webkit-selection { background:#B9B9B9; color:#000000; }
    

    Note that the selection pseudo has been removed from the current draft.

    0 讨论(0)
提交回复
热议问题