What is the mouse down selector in CSS?

后端 未结 4 615
既然无缘
既然无缘 2021-01-31 00:44

I have noticed that buttons and other elements have a default styling and behave in 3 steps: normal view, hover/focus view and mousedown/click view, in CSS I can change the styl

4条回答
  •  -上瘾入骨i
    2021-01-31 01:28

    I think you mean the active state

     button:active{
      //some styling
     }
    

    These are all the possible pseudo states a link can have in CSS:

    a:link {color:#FF0000;}    /* unvisited link, same as regular 'a' */
    a:hover {color:#FF00FF;}   /* mouse over link */
    a:focus {color:#0000FF;}   /* link has focus */
    a:active {color:#0000FF;}  /* selected link */
    a:visited {color:#00FF00;} /* visited link */
    

    See also: http://www.w3.org/TR/selectors/#the-user-action-pseudo-classes-hover-act

提交回复
热议问题