Proper touch button behavior for MobileSafari

后端 未结 1 1742
猫巷女王i
猫巷女王i 2021-02-14 12:26

MobileSafari as a rule has incorrect HTML button behavior (incorrect meaning: \"not like an iOS native button\"). Correct button behavior is as follows:

  • User touch
1条回答
  •  庸人自扰
    2021-02-14 12:34

    Basically what you'd want to do is build out some sort of hybrid hover functionality for touch devices, which detects when your finger moves in/out of the button in question.

    I built a basic JSFiddle which implements some barebones functionality. If you know any javascript, I think you'll get the idea.

    Live JSFiddle DEMO

    Try it on your iOS device (and maybe your Android device??).

    - brian

    0 讨论(0)
提交回复
热议问题