🪟 Windows TippsAndroid 17: Neue Version ist hier – Das ist alles neu(16.09.2026 um 11:40 Uhr)
🕵️ Hacking12 Best CASB Solutions Compared (2026): Features & Pricing(16.09.2026 um 09:31 Uhr)
🕵️ Hacking12 Best CIEM Tools Compared (2026): Features & Pricing(16.09.2026 um 09:37 Uhr)
🪟 Windows TippsAndroid 17: Neue Version ist hier – Das ist alles neu(16.09.2026 um 11:40 Uhr)
🕵️ Hacking12 Best CASB Solutions Compared (2026): Features & Pricing(16.09.2026 um 09:31 Uhr)
🕵️ Hacking12 Best CIEM Tools Compared (2026): Features & Pricing(16.09.2026 um 09:37 Uhr)

🔧 Programmierung 🕛 vor 2 Jahren 2 Min Lesezeit
0

CSS animation and interaction delay.

↗ Quelle (dev.to)
🗣️ Stimme:




Tap tap tapping.



A blog written in 3rd person. For no reason.



For this game Ben Evans wanted some very simple controls. Basically a single tap anywhere to control it. And you can't get much simpler than that!



From a coding perspective, this will involve putting a stack of labels as invisible layers on top of everything. The label will be linked to a checkbox or radio button, which will control what is displayed.



So: Display a label > user taps label > label's 'for' attribute is connected with ID of input > if input is checked then animate the snake the appropriate way.




CODE
<label for="right-start"></label>
<input id="right-start" name="start" type="radio" />

#right-start:checked ~ .start-right {
display: block;
}






So that's all good. The next problem Ben needed to solve is how to bring these labels in fast. He wanted them to animate in sequence; up, right, down, left. On a timer. So that when the user taps the screen, it could go in the direction currently displaying, as it cycles through the loop.



The trouble is, it seems, is that there is a delay in when something is shown and when it is clickable.



Ben had previously built a table tennis game, using a similar timing device and this seemed to work fine. But he didn't notice the lag. Possible because it wasn't super fast.







But this time Ben requires it to happen faster, and the lag seems very noticeable. Sad Face ☹



He has built a simple example of it on CodePen for you to see for yourself. If you tap 'Edit on CodePen' then you can adjust the timings:







It actually seems very usable on a two second repeat. If you change $t to one then it only responds on double taps. But this is based on Ben's laptop. It probably depends on the GPU and CPU speed. And probably also on how complex the future CSS will be.



Ben would be interested to find out how it behaves for you. Please leave a comment on whether the appropriate radio is checked when you tap the screen. He would be very much appreciative 🙏

Vollständiger Original-Artikel
Den kompletten Beitrag mit allen Details direkt auf dev.to lesen.
↗ Original-Artikel auf dev.to lesen
Wie bewertest du diesen Beitrag?
1 Klick Feedback
Teilen mit Netzwerk & Team:

Community-Analysen & Experten-Meinungen 0

Verfasse deine eigene Analyse, teile Workarounds oder diskutiere diesen Vorfall im Blog.
Noch keine Community-Analyse verfasst. Markiere einen Textabschnitt oder klicke oben auf Eigene Analyse verfassen“!
Community Pulse: Relevanz-Einschätzung
1 Klick Experten-Votum
🔴 Akute Relevanz 0%
🟡 In Evaluierung 0%
🟢 Keine Auswirkung 0%
Spannende Innovation 0%
Verwandte Story-Cluster & Quellen (Vektor-KI)
Port 8095 Engine
2 Quellen
CVE-2026-88255 | ZenHive mpp up to 0.16.1 Duplicate Submission Gate lib/mpp/replay.ex reserve_hash_atomic input validation (EUVD-2026-80256)
1 Quelle
Android 17: Neue Version ist hier – Das ist alles neu
1 Quelle
Die entscheidende Hürde: Xpeng will deutsch und nicht chinesisch sein
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten CSS animation and interaction delay.

Thematisch verwandte Begriffe: animation, interaction, delay · 6 Treffer

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...