What is the correct behavior for smartphone display if you specify a link among the elements that are set to animation in CSS:hover?

Asked 2 years ago, Updated 2 years ago, 69 views

Q1. What is the correct behavior if you click the link in the example below?
·After running the animation to the end, link transition
·Link transition in the middle of animation
·Link transition without animation
·Depending on the animation content?

html

<button class="hoge">
  <a href="/">Link</a>
</button>

css

.hoge:hover{
    animation —anim 0.5s forwards;
}
@-webkit-keyframes anim

Q2.a Will the meaning change if I take the tag out?

<a href="/">
  <button class="hoge">
    link
  </button>

Q3. Only the actual smartphone does not link transition…
·It works with PC and emulation, but only the actual smartphone does not link transition
·It will be animated, but that's all
·What are the possible causes?

android css html5

2022-09-30 21:23

2 Answers

Since there is no behavior equivalent to hover on smartphones,
·Link transition without animation
I think it will be.
I think the link transition is different from the hover.

I mean, isn't it necessary to use the button tag and the a tag together?

<a href="/"class="hoge">Link</a>

Can't we?


2022-09-30 21:23

If I tap twice on my smartphone, won't it transition?
It depends on the device, but I think the first tap will cause the hover to move and the second transition will occur.
I don't have a hover on my phone.


2022-09-30 21:23

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.