How to change the highlight color of textbox using focus selector in css

后端 未结 3 1317
有刺的猬
有刺的猬 2020-12-20 16:17

I\'m new to CSS. I have a input text field where I need to change the color of the border from red to another color. I used focus selector in CSS

3条回答
  •  粉色の甜心
    2020-12-20 16:46

    You are using .element text:focus which selects nothing because there is no element like text in .element. Instead of this you have to use .element.text:focus for eg.

    .element.text:focus{
       ...
    }
    

提交回复
热议问题