Changing :hover to touch/click for mobile devices

后端 未结 9 1987
余生分开走
余生分开走 2020-11-28 19:43

I\'ve had a look around but can\'t quite find what i\'m looking for.

I currently have a css animation on my page which is triggered by :hover. I would like this to c

9条回答
  •  星月不相逢
    2020-11-28 20:14

    I got the same trouble, in mobile device with Microsoft's Edge browser. I can solve the problem with: aria-haspopup="true". It need to add to the div and the :hover, :active, :focus for the other mobile browsers.

    Example html:

    CSS:

    .left_bar:hover, .left_bar:focus, .left_bar:active{
        left: 0%;
        }
    

提交回复
热议问题