Performance: Carousel captions
MEDIUM IMPACT
This affects page load speed and interaction responsiveness by adding DOM elements and CSS styles for captions in carousels.
<div class="carousel-caption d-none d-md-block"> <h5>Slide Title</h5> <p>Slide description with simple fade using opacity only.</p> </div>
<div class="carousel-caption d-none d-md-block"> <h5 class="animated fadeInDown">Slide Title</h5> <p class="animated fadeInUp">Slide description with heavy CSS animations.</p> </div>
| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Heavy animated captions | Adds multiple nodes with animation classes | Multiple reflows per animation frame | High paint cost due to layout thrashing | [X] Bad |
| Simple static captions | Adds minimal nodes without animations | Single reflow on load | Low paint cost with no layout shifts | [OK] Good |