How to change cursor color without changing text color?

前端 未结 5 2075
日久生厌
日久生厌 2020-12-02 00:12

I want to have the cursor #FFF while my font is #000.

Is that possible?

5条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-02 01:08

    From the mozilla docs

    /* Keyword values */
    caret-color: auto;
    caret-color: transparent;
    caret-color: currentColor;
    
    /*  values */
    caret-color: red;
    caret-color: #5729e9;
    caret-color: rgb(0, 200, 0);
    caret-color: hsla(228, 4%, 24%, 0.8);
    

提交回复
热议问题