Home  >  Q&A  >  body text

css - iScroll 里a:active不起作用改如何解决

在iScroll里点击起不到作用

PHPzPHPz2765 days ago642

reply all(1)I'll reply

  • 怪我咯

    怪我咯2017-04-17 14:27:57

    iScroll will block the default behavior of events in order to simulate scrolling. Therefore, your a tag cannot be clicked, the event will not be triggered, and there will be no :active. Do not try to bind a Defining the event and then adding a new active class is in vain. You can take a look at the iscroll documentation. It specifically talks about this. The parameter is: preventDefaultException:{tagName:/^(INPUT|TEXTAREA|BUTTON|SELECT|A)$/}, so that the a tag can add events normally.

    reply
    0
  • Cancelreply