1. Forum
    1. Unerledigte Themen
  2. Artikel
  3. Mitglieder
    1. Letzte Aktivitäten
    2. Benutzer online
    3. Team
    4. Mitgliedersuche
  4. Blog
    1. Artikel
  • Anmelden
  • Registrieren
  • Suche
Blog-Artikel
  • Alles
  • Artikel
  • Forum
  • Blog-Artikel
  • Seiten
  • Erweiterte Suche
  1. StageTwo - Deine Wohlfühloase
  2. Blog

FragSalat's Blog

Blog-Artikel mit dem Tag „transition“

  • RSS-Feed
FragSalat's Blog

How to fix CSS transition from JavaScript

Today I struggled with a weird behavior of CSS transitions. In some cases they worked and in some not. So I investigated a bit and could find a solution and even kind of an explanation :D My use case was a overlay element whose height should be animated via CSS transitions when opening and closing based on the content it has. The content itself was absolute positioned for several reasons and I had to get the height of all children every time they change. In a previous version the code kind of looked like this: (Quelltext, 31 Zeilen) When the overlay opens, it get's the height of it's children and the children notifies the container when their height changes in meanwhile. This worked very well so far but I wanted to decouple the opening logic from the special overlay to have a more generic overlay with dynamic content. This generic overlay should not know anything about the children it renders but it's height. So I introduced a `setHeight(int)` function to the Overlay, which can…
FragSalat
16. Mai 2018 um 18:14
Gefällt mir 1
0
Es wurden keine Einträge gefunden.

Kategorien

  1. Default Category

Archiv

  1. 2019 (4)
    1. September (1)
    2. Mai (1)
    3. März (1)
    4. Februar (1)
  2. 2018 (7)
    1. August (1)
    2. Juni (2)
    3. Mai (3)
    4. April (1)
  3. 2017 (2)
    1. Oktober (2)

Tags

  • ansluta
  • attiny84
  • aurelia
  • cc2500
  • ccs811
  • CSS
  • dht22
  • flux
  • google assistant
  • ikea
  • javascript
  • logging
  • logitech
  • lua
  • macro
  • memory leak
  • nodejs
  • phalcon
  • php
  • polymer
  • raspberry
  • rfm69
  • rust
  • smart home
  • sonos
  • state management
  • transition
  • web components
  1. Datenschutzerklärung
  2. Impressum