﻿{"id":558,"date":"2026-02-05T23:49:16","date_gmt":"2026-02-05T22:49:16","guid":{"rendered":"https:\/\/lmspro.fr\/22-les-animations-css-avancees\/"},"modified":"2026-02-17T19:38:38","modified_gmt":"2026-02-17T18:38:38","slug":"les-animations-css-avancees-part2","status":"publish","type":"post","link":"https:\/\/lmspro.fr\/en\/les-animations-css-avancees-part2\/","title":{"rendered":"Advanced CSS Animations Part 2"},"content":{"rendered":"<h2>22 Advanced CSS Animations<\/h2>\n<p class=\"wpa-text\">Dive into the fascinating world of advanced CSS animations and discover how to create captivating interactive experiences. Master professional techniques to bring your interfaces to life with fluidity and elegance.<\/p>\n<div class=\"article-meta\">\n<p><strong>Module:<\/strong> Module 1: Technical Fundamentals of the Web<\/p>\n<p><strong>Level :<\/strong> Beginner<\/p>\n<p><strong>Duration :<\/strong> 20 minutes<\/p>\n<p><strong>Prerequisites:<\/strong> None<\/p>\n<\/div>\n<h2>Educational objectives<\/h2>\n<ul>\n<li>Mastering CSS animation properties and their advanced parameters<\/li>\n<li>Create smooth animations with custom timing features<\/li>\n<li>Implement 3D transformations and perspective effects<\/li>\n<li>Develop user interactions with triggered animations<\/li>\n<li>Optimize animation performance for an optimal user experience<\/li>\n<\/ul>\n<div class=\"wpa-accordion wpa-accordion-flush\" id=\"accordion-22-les-animations-css-avancees\">\n<div class=\"wpa-accordion-item\">\n<button class=\"wpa-accordion-header\" data-wpa-target=\"#accordion-22-les-animations-css-avancees-item-1\" aria-expanded=\"false\"><span class=\"wpa-accordion-title\"><span class=\"wpa-accordion-number\">01<\/span> The fundamentals of CSS animations<\/span><span class=\"wpa-accordion-icon\"><\/span><\/button><\/p>\n<div id=\"accordion-22-les-animations-css-avancees-item-1\" class=\"wpa-accordion-body\">\n<div class=\"wpa-accordion-content\">\n<h4>Understanding @keyframes and animation<\/h4>\n<p>CSS animations rely on two fundamental concepts: @keyframes, which define the animation&#039;s stages, and the animation property, which controls its execution. @keyframes allow you to specify the values of CSS properties at different points in the animation, creating smooth transitions between states. The syntax @keyframes animation-name { 0% { } 100% { } } establishes the start and end points, but you can add as many intermediate stages as needed with specific percentages.<\/p>\n<h4>Essential animation properties<\/h4>\n<p>The `animation` property is a shorthand that combines several sub-properties: `animation-name` (keyframe names), `animation-duration` (duration), `animation-timing-function` (speed curve), `animation-delay` (delay), `animation-iteration-count` (number of repetitions), `animation-direction` (playback direction), and `animation-fill-mode` (before\/after state). Each property plays a crucial role in the final rendering. For example, `animation-timing-function` with values like `ease-in-out`, `cubic-bezier()`, or `steps()` allows you to create natural or mechanical movements depending on the context.<\/p>\n<div class=\"info-box\">\n<p><strong>Key point<\/strong> : Use animation-fill-mode: forwards to maintain the final state of the animation, thus avoiding an abrupt return to the initial state.<\/p>\n<\/div>\n<div class=\"tuto-objectif\" style=\"background: #f5f5f5;border-left: 4px solid #667eea;padding: 16px 20px;margin-top: 24px;border-radius: 0 8px 8px 0\">\n<h3 style=\"color: #667eea;margin: 0 0 8px 0;font-size: 16px\">Key points to remember<\/h3>\n<p style=\"margin: 0;color: #333\">CSS animations combine @keyframes to define the steps and the animation property to control execution, offering precise control over timing and transitions.<\/p>\n<\/div>\n<div class=\"tuto-exercise\" style=\"background: #fff3e0;border-left: 4px solid #ff9800;padding: 16px 20px;margin-top: 20px;border-radius: 0 8px 8px 0\">\n<h4 style=\"color: #ff9800;margin: 0 0 8px 0;font-size: 15px\">\ud83c\udfaf Mini-exercise: Create an animated loader with a pulse<\/h4>\n<p style=\"margin: 0;color: #333;font-size: 14px\">Build a load indicator with a smooth pulse animation using @keyframes and advanced animation properties.<\/p>\n<\/div>\n<div class=\"codepen-block\" data-block-id=\"exercise-1\">\n<p class=\"codepen-block-label\">Reference code:<\/p>\n<div class=\"codepen-header\">\n<div class=\"codepen-tabs\">\n<button class=\"codepen-tab active\" data-tab=\"html\">HTML<\/button><br \/>\n<button class=\"codepen-tab\" data-tab=\"css\">CSS<\/button><br \/>\n<button class=\"codepen-tab\" data-tab=\"javascript\">JS<\/button>\n<\/div>\n<p><button class=\"codepen-copy-btn\">Copy<\/button>\n<\/div>\n<div class=\"codepen-code-container\">\n<pre class=\"codepen-code active\" data-lang=\"html\">&lt;div class=&quot;loader-container&quot;&gt;\n  &lt;div class=&quot;pulse-loader&quot;&gt;\n    &lt;div class=&quot;pulse-ring&quot;&gt;&lt;\/div&gt;\n    &lt;div class=&quot;pulse-ring&quot;&gt;&lt;\/div&gt;\n    &lt;div class=&quot;pulse-ring&quot;&gt;&lt;\/div&gt;\n  &lt;\/div&gt;\n  &lt;p class=&quot;loading-text&quot;&gt;Loading...&lt;\/p&gt;\n&lt;\/div&gt;<\/pre>\n<pre class=\"codepen-code\" data-lang=\"css\">@keyframes pulse { 0% { transform: scale(0); opacity: 1; } 100% { transform: scale(1); opacity: 0; } } @keyframes textGlow { 0%, 100% { opacity: 0.6; } 50% { opacity: 1; } } .loader-container { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 200px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); border-radius: 16px; } .pulse-loader { position: relative; width: 60px; height: 60px; } .pulse-ring { position: absolute; border: 3px solid rgba(255, 255, 255, 0.8); border-radius: 50%; width: 100%; height: 100%; animation: pulse 1.5s ease-out infinite; } .pulse-ring:nth-child(1) { animation-delay: 0s; } .pulse-ring:nth-child(2) { animation-delay: 0.5s; } .pulse-ring:nth-child(3) { animation-delay: 1s; } .loading-text { margin-top: 20px; color:white; font-family: &#039;Arial&#039;, sans-serif; font-weight: 300; letter-spacing: 2px; animation: textGlow 2s ease-in-out infinite; }<\/pre>\n<pre class=\"codepen-code\" data-lang=\"javascript\">\/\/ Optional JavaScript code to control the loading state const loader = document.querySelector(&#039;.loader-container&#039;); \/\/ Simulating a load setTimeout(() =&gt; { loader.style.opacity = &#039;0&#039;; loader.style.transition = &#039;opacity 0.5s ease&#039;; }, 5000);<\/pre>\n<\/div>\n<\/div>\n<div class=\"monaco-sandbox\" data-block-id=\"exercise-1\">\n<div class=\"monaco-header\">\n<div class=\"monaco-tabs\">\n<button class=\"monaco-tab active\" data-lang=\"html\">HTML<\/button><br \/>\n<button class=\"monaco-tab\" data-lang=\"css\">CSS<\/button><br \/>\n<button class=\"monaco-tab\" data-lang=\"javascript\">JS<\/button>\n<\/div>\n<div class=\"monaco-actions\">\n<button class=\"monaco-btn monaco-btn-run\">\u25b6 Run<\/button><br \/>\n<button class=\"monaco-btn monaco-btn-reset\">\u21ba Reset<\/button>\n<\/div>\n<\/div>\n<div class=\"monaco-container\">\n<div class=\"monaco-editor-wrapper\">\n<div class=\"monaco-editor-pane active\" data-lang=\"html\"><\/div>\n<div class=\"monaco-editor-pane\" data-lang=\"css\"><\/div>\n<div class=\"monaco-editor-pane\" data-lang=\"javascript\"><\/div>\n<\/div>\n<div class=\"monaco-preview-wrapper\">\n<div class=\"monaco-preview-header\">Result<\/div>\n<\/div>\n<\/div>\n<div class=\"monaco-status\">\n<span class=\"monaco-status-left\">\u25cf Ready<\/span><br \/>\n<span class=\"monaco-status-right\">Monaco Editor v0.45<\/span>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"wpa-accordion-item\">\n<button class=\"wpa-accordion-header\" data-wpa-target=\"#accordion-22-les-animations-css-avancees-item-2\" aria-expanded=\"false\"><span class=\"wpa-accordion-title\"><span class=\"wpa-accordion-number\">02<\/span> 3D transformations and animations<\/span><span class=\"wpa-accordion-icon\"><\/span><\/button><\/p>\n<div id=\"accordion-22-les-animations-css-avancees-item-2\" class=\"wpa-accordion-body\">\n<div class=\"wpa-accordion-content\">\n<h4>Mastering 3D transformations<\/h4>\n<p>3D transformations in CSS open up a world of creative possibilities by adding depth to your animations. The functions `transform3d()`, `rotateX()`, `rotateY()`, `rotateZ()`, and `translateZ()` allow you to manipulate elements in three-dimensional space. The `perspective` property defines the distance between the user and the element, creating the illusion of depth. The lower the perspective value, the more pronounced the 3D effect will be. The `transform-style: preserve-3d` property is essential for maintaining the 3D perspective on child elements.<\/p>\n<h4>Perspective and backface-visibility<\/h4>\n<p>Perspective management is crucial for successful 3D animations. The `perspective` property can be applied to the parent container or directly to the element using `perspective-origin` to control the viewpoint. The `backface-visibility: hidden` property hides the back face of elements during rotations, preventing unwanted visual effects. These techniques are particularly useful for creating flip card effects, rotating cubes, or immersive galleries where elements appear to float in space.<\/p>\n<div class=\"info-box\">\n<p><strong>Key point<\/strong> : Use transform: translateZ(0) or will-change: transform to enable hardware acceleration and optimize the performance of 3D animations.<\/p>\n<\/div>\n<div class=\"tuto-objectif\" style=\"background: #f5f5f5;border-left: 4px solid #667eea;padding: 16px 20px;margin-top: 24px;border-radius: 0 8px 8px 0\">\n<h3 style=\"color: #667eea;margin: 0 0 8px 0;font-size: 16px\">Key points to remember<\/h3>\n<p style=\"margin: 0;color: #333\">3D transformations require precise management of perspective and transform-style to create convincing and effective depth effects.<\/p>\n<\/div>\n<div class=\"tuto-exercise\" style=\"background: #fff3e0;border-left: 4px solid #ff9800;padding: 16px 20px;margin-top: 20px;border-radius: 0 8px 8px 0\">\n<h4 style=\"color: #ff9800;margin: 0 0 8px 0;font-size: 15px\">\ud83c\udfaf Mini-exercise: Interactive 3D card flip<\/h4>\n<p style=\"margin: 0;color: #333;font-size: 14px\">Create a map that flips into 3D on hover, revealing content on its hidden side with smooth transitions and a realistic perspective.<\/p>\n<\/div>\n<div class=\"codepen-block\" data-block-id=\"exercise-2\">\n<p class=\"codepen-block-label\">Reference code:<\/p>\n<div class=\"codepen-header\">\n<div class=\"codepen-tabs\">\n<button class=\"codepen-tab active\" data-tab=\"html\">HTML<\/button><br \/>\n<button class=\"codepen-tab\" data-tab=\"css\">CSS<\/button><br \/>\n<button class=\"codepen-tab\" data-tab=\"javascript\">JS<\/button>\n<\/div>\n<p><button class=\"codepen-copy-btn\">Copy<\/button>\n<\/div>\n<div class=\"codepen-code-container\">\n<pre class=\"codepen-code active\" data-lang=\"html\">&lt;div class=&quot;flip-container&quot;&gt;\n  &lt;div class=&quot;flip-card&quot;&gt;\n    &lt;div class=&quot;flip-card-front&quot;&gt;\n      &lt;div class=&quot;card-content&quot;&gt;\n        &lt;h3&gt;Innovation&lt;\/h3&gt;\n        &lt;div class=&quot;card-icon&quot;&gt;\ud83d\udca1&lt;\/div&gt;\n        &lt;p&gt;Fly over to discover&lt;\/p&gt;\n      &lt;\/div&gt;\n    &lt;\/div&gt;\n    &lt;div class=&quot;flip-card-back&quot;&gt;\n      &lt;div class=&quot;card-content&quot;&gt;\n        &lt;h3&gt;Creativity&lt;\/h3&gt;\n        &lt;p&gt;CSS animations allow you to create memorable and engaging user experiences.&lt;\/p&gt;\n        &lt;button class=&quot;cta-button&quot;&gt;Learn more&lt;\/button&gt;\n      &lt;\/div&gt;\n    &lt;\/div&gt;\n  &lt;\/div&gt;\n&lt;\/div&gt;<\/pre>\n<pre class=\"codepen-code\" data-lang=\"css\">.flip-container { perspective: 1000px; width: 300px; height: 200px; margin: 20px auto; } .flip-card { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform 0.6s cubic-bezier(0.4, 0.0, 0.2, 1); cursor: pointer; } .flip-container:hover .flip-card { transform: rotateY(180deg); } .flip-card-front, .flip-card-back { position: absolute; width: 100%; height: 100%; backface-visibility: hidden; border-radius: 16px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); display:flex; align-items: center; justify-content: center; } .flip-card-front { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color:white; } .flip-card-back { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); color:white; transform: rotateY(180deg); } .card-content { text-align: center; padding: 20px; } .card-content h3 { margin: 0 0 15px 0; font-size: 24px; font-weight: 600; } .card-icon { font-size: 48px; margin: 15px 0; animation: float 2s ease-in-out infinite; } @keyframes float { 0%, 100% { transform: translateY(0px); } 50% { transform: translateY(-10px); } } .cta-button { background: rgba(255,255,255,0.2); border: 2px solid rgba(255,255,255,0.3); color:white; padding: 10px 20px; border-radius: 25px; cursor: pointer; transition: all 0.3s ease; backdrop-filter: blur(10px); } .cta-button:hover { background: rgba(255,255,255,0.3); transform: translateY(-2px); }<\/pre>\n<pre class=\"codepen-code\" data-lang=\"javascript\">\/\/ Added touch interaction for mobile document.querySelectorAll(&#039;.flip-card&#039;).forEach(card =&gt; { card.addEventListener(&#039;click&#039;, function() { this.style.transform = this.style.transform === &#039;rotateY(180deg)&#039; ? &#039;rotateY(0deg)&#039; : &#039;rotateY(180deg)&#039;; }); });<\/pre>\n<\/div>\n<\/div>\n<div class=\"monaco-sandbox\" data-block-id=\"exercise-2\">\n<div class=\"monaco-header\">\n<div class=\"monaco-tabs\">\n<button class=\"monaco-tab active\" data-lang=\"html\">HTML<\/button><br \/>\n<button class=\"monaco-tab\" data-lang=\"css\">CSS<\/button><br \/>\n<button class=\"monaco-tab\" data-lang=\"javascript\">JS<\/button>\n<\/div>\n<div class=\"monaco-actions\">\n<button class=\"monaco-btn monaco-btn-run\">\u25b6 Run<\/button><br \/>\n<button class=\"monaco-btn monaco-btn-reset\">\u21ba Reset<\/button>\n<\/div>\n<\/div>\n<div class=\"monaco-container\">\n<div class=\"monaco-editor-wrapper\">\n<div class=\"monaco-editor-pane active\" data-lang=\"html\"><\/div>\n<div class=\"monaco-editor-pane\" data-lang=\"css\"><\/div>\n<div class=\"monaco-editor-pane\" data-lang=\"javascript\"><\/div>\n<\/div>\n<div class=\"monaco-preview-wrapper\">\n<div class=\"monaco-preview-header\">Result<\/div>\n<\/div>\n<\/div>\n<div class=\"monaco-status\">\n<span class=\"monaco-status-left\">\u25cf Ready<\/span><br \/>\n<span class=\"monaco-status-right\">Monaco Editor v0.45<\/span>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"wpa-accordion-item\">\n<button class=\"wpa-accordion-header\" data-wpa-target=\"#accordion-22-les-animations-css-avancees-item-3\" aria-expanded=\"false\"><span class=\"wpa-accordion-title\"><span class=\"wpa-accordion-number\">03<\/span> Advanced timing functions<\/span><span class=\"wpa-accordion-icon\"><\/span><\/button><\/p>\n<div id=\"accordion-22-les-animations-css-avancees-item-3\" class=\"wpa-accordion-body\">\n<div class=\"wpa-accordion-content\">\n<h4>Custom B\u00e9zier curves<\/h4>\n<p>Timing functions control the speed of an animation over time, creating more natural and expressive movements. Cubic B\u00e9zier curves, defined with `cubic-bezier(x1, y1, x2, y2)`, offer precise control over acceleration and deceleration. Tools like cubic-bezier.com allow you to view and create these curves interactively. Preset values like `ease`, `ease-in`, and `ease-out` are not always sufficient for sophisticated animations. A curve like `cubic-bezier(0.68, -0.55, 0.265, 1.55) creates a subtle bounce effect, while `cubic-bezier(0.25, 0.46, 0.45, 0.94)` produces a more organic movement.<\/p>\n<h4>The steps() function for discrete animations<\/h4>\n<p>The `steps()` function allows you to create animations in discrete steps rather than continuous ones, ideal for animation sprites or typewriter effects. The syntax `steps(number-of-steps, start|end)` divides the animation into equal segments. For example, `steps(10, end)` divides the animation into 10 equal steps, stopping at the end of each step. This technique is particularly useful for animating characters that appear one by one, digital counters, or pixel art animations where smooth movement is not desired.<\/p>\n<div class=\"info-box\">\n<p><strong>Key point<\/strong> : Combine different timing functions on multiple properties of the same element to create complex and natural movements.<\/p>\n<\/div>\n<div class=\"tuto-objectif\" style=\"background: #f5f5f5;border-left: 4px solid #667eea;padding: 16px 20px;margin-top: 24px;border-radius: 0 8px 8px 0\">\n<h3 style=\"color: #667eea;margin: 0 0 8px 0;font-size: 16px\">Key points to remember<\/h3>\n<p style=\"margin: 0;color: #333\">Custom timing functions with cubic-bezier() and steps() allow you to create unique animations that stand out from standard effects.<\/p>\n<\/div>\n<div class=\"tuto-exercise\" style=\"background: #fff3e0;border-left: 4px solid #ff9800;padding: 16px 20px;margin-top: 20px;border-radius: 0 8px 8px 0\">\n<h4 style=\"color: #ff9800;margin: 0 0 8px 0;font-size: 15px\">\ud83c\udfaf Mini-exercise: Typewriter effect with bounce<\/h4>\n<p style=\"margin: 0;color: #333;font-size: 14px\">Create a text effect that appears character by character with a custom timing curve and a blinking cursor.<\/p>\n<\/div>\n<div class=\"codepen-block\" data-block-id=\"exercise-3\">\n<p class=\"codepen-block-label\">Reference code:<\/p>\n<div class=\"codepen-header\">\n<div class=\"codepen-tabs\">\n<button class=\"codepen-tab active\" data-tab=\"html\">HTML<\/button><br \/>\n<button class=\"codepen-tab\" data-tab=\"css\">CSS<\/button><br \/>\n<button class=\"codepen-tab\" data-tab=\"javascript\">JS<\/button>\n<\/div>\n<p><button class=\"codepen-copy-btn\">Copy<\/button>\n<\/div>\n<div class=\"codepen-code-container\">\n<pre class=\"codepen-code active\" data-lang=\"html\">&lt;div class=&quot;typewriter-container&quot;&gt;\n  &lt;h1 class=&quot;typewriter-text&quot;&gt;\n    &lt;span class=&quot;text-content&quot;&gt;Advanced CSS Animations&lt;\/span&gt;\n    &lt;span class=&quot;cursor&quot;&gt;|&lt;\/span&gt;\n  &lt;\/h1&gt;\n  &lt;p class=&quot;subtitle&quot;&gt;Discover the power of timing curves&lt;\/p&gt;\n&lt;\/div&gt;<\/pre>\n<pre class=\"codepen-code\" data-lang=\"css\">@keyframes typing { from { width: 0; } to { width: 100%; } } @keyframes blink { from, to { opacity: 1; } 50% { opacity: 0; } } @keyframes slideInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } } .typewriter-container { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 300px; background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%); color:white; font-family: &#039;Courier New&#039;, minivan; padding: 40px; border-radius: 20px; } .typewriter-text { font-size: 2.5rem; margin: 0; white-space: nowrap; overflow:hidden; display: inline-block; position: relative; } .text-content { display: inline-block; overflow:hidden; white-space: nowrap; animation: typing 4s steps(22, end) cubic-bezier(0.68, -0.55, 0.265, 1.55); width: 0; animation-fill-mode: forwards; } .cursor { display: inline-block; background-color: white; margin-left: 2px; width: 3px; animation: blink 1s infinite; animation-delay: 4s; } .subtitle { margin-top: 30px; font-size: 1.2rem; opacity: 0; animation: slideInUp 0.8s ease-out 4.5s forwards; color: rgba(255, 255, 255, 0.8); text-align: center; } \/* Bounce animation for the whole *\/ .typewriter-container { animation: containerBounce 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55); } @keyframes containerBounce { 0% { transform: scale(0.3) rotate(-5deg); opacity: 0; } 50% { transform: scale(1.05) rotate(1deg); } 100% { transform: scale(1) rotate(0deg); opacity: 1; } }<\/pre>\n<pre class=\"codepen-code\" data-lang=\"javascript\">\/\/ Restart the click animation document.querySelector(&#039;.typewriter-container&#039;).addEventListener(&#039;click&#039;, function() { const textContent = document.querySelector(&#039;.text-content&#039;); const cursor = document.querySelector(&#039;.cursor&#039;); const subtitle = document.querySelector(&#039;.subtitle&#039;); \/\/ Reset the animations textContent.style.animation = &#039;none&#039;; cursor.style.animation = &#039;none&#039;; subtitle.style.animation = &#039;none&#039;; \/\/ Force reflow textContent.offsetHeight; \/\/ Rerun animations setTimeout(() =&gt; { textContent.style.animation = &#039;typing 4s steps(22, end) cubic-bezier(0.68, -0.55, 0.265, 1.55)&#039;; cursor.style.animation = &#039;blink 1s infinite&#039;; cursor.style.animationDelay = &#039;4s&#039;; subtitle.style.animation = &#039;slideInUp 0.8s ease-out 4.5s forwards&#039;; }, 100); });<\/pre>\n<\/div>\n<\/div>\n<div class=\"monaco-sandbox\" data-block-id=\"exercise-3\">\n<div class=\"monaco-header\">\n<div class=\"monaco-tabs\">\n<button class=\"monaco-tab active\" data-lang=\"html\">HTML<\/button><br \/>\n<button class=\"monaco-tab\" data-lang=\"css\">CSS<\/button><br \/>\n<button class=\"monaco-tab\" data-lang=\"javascript\">JS<\/button>\n<\/div>\n<div class=\"monaco-actions\">\n<button class=\"monaco-btn monaco-btn-run\">\u25b6 Run<\/button><br \/>\n<button class=\"monaco-btn monaco-btn-reset\">\u21ba Reset<\/button>\n<\/div>\n<\/div>\n<div class=\"monaco-container\">\n<div class=\"monaco-editor-wrapper\">\n<div class=\"monaco-editor-pane active\" data-lang=\"html\"><\/div>\n<div class=\"monaco-editor-pane\" data-lang=\"css\"><\/div>\n<div class=\"monaco-editor-pane\" data-lang=\"javascript\"><\/div>\n<\/div>\n<div class=\"monaco-preview-wrapper\">\n<div class=\"monaco-preview-header\">Result<\/div>\n<\/div>\n<\/div>\n<div class=\"monaco-status\">\n<span class=\"monaco-status-left\">\u25cf Ready<\/span><br \/>\n<span class=\"monaco-status-right\">Monaco Editor v0.45<\/span>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"wpa-accordion-item\">\n<button class=\"wpa-accordion-header\" data-wpa-target=\"#accordion-22-les-animations-css-avancees-item-4\" aria-expanded=\"false\"><span class=\"wpa-accordion-title\"><span class=\"wpa-accordion-number\">04<\/span> Animations triggered by interactions<\/span><span class=\"wpa-accordion-icon\"><\/span><\/button><\/p>\n<div id=\"accordion-22-les-animations-css-avancees-item-4\" class=\"wpa-accordion-body\">\n<div class=\"wpa-accordion-content\">\n<h4>Animations on flyover and states<\/h4>\n<p>Animations triggered by user interactions create responsive and engaging interfaces. The :hover, :active, :focus, and :checked pseudo-classes allow you to trigger smooth transitions without JavaScript. The key is to define base states and triggered states with well-configured transition properties. For example, `transform: scale(1.1)` on hover with `transition: transform 0.3s ease` creates a subtle zoom effect. Animations can also be triggered by classes added dynamically via JavaScript, offering more flexibility for complex interactions such as scrolling, multiple clicks, or touch gestures.<\/p>\n<h4>Managing multiple states and micro-interactions<\/h4>\n<p>Micro-interactions are small animations that guide the user and provide feedback on their actions. A button can have several states: rest, hover, click, and disabled, each with its own animation. Using `animation-play-state: paused` allows you to control the playback of animations in real time. States can also be chained: an element can transition from its initial state to an intermediate state on hover, and then to its final state on click. This multi-layered approach creates rich and intuitive user experiences, where each action is accompanied by appropriate visual feedback.<\/p>\n<div class=\"info-box\">\n<p><strong>Key point<\/strong> : Use transition-delay to create cascading animations where multiple elements animate successively during an interaction.<\/p>\n<\/div>\n<div class=\"tuto-objectif\" style=\"background: #f5f5f5;border-left: 4px solid #667eea;padding: 16px 20px;margin-top: 24px;border-radius: 0 8px 8px 0\">\n<h3 style=\"color: #667eea;margin: 0 0 8px 0;font-size: 16px\">Key points to remember<\/h3>\n<p style=\"margin: 0;color: #333\">User interactions trigger animations that provide immediate feedback and enhance the user experience through well-designed micro-interactions.<\/p>\n<\/div>\n<div class=\"tuto-exercise\" style=\"background: #fff3e0;border-left: 4px solid #ff9800;padding: 16px 20px;margin-top: 20px;border-radius: 0 8px 8px 0\">\n<h4 style=\"color: #ff9800;margin: 0 0 8px 0;font-size: 15px\">\ud83c\udfaf Mini-exercise: Morphing button with multiple states<\/h4>\n<p style=\"margin: 0;color: #333;font-size: 14px\">Create an interactive button that changes shape, color, and content based on user interactions (hover, active, success).<\/p>\n<\/div>\n<div class=\"codepen-block\" data-block-id=\"exercise-4\">\n<p class=\"codepen-block-label\">Reference code:<\/p>\n<div class=\"codepen-header\">\n<div class=\"codepen-tabs\">\n<button class=\"codepen-tab active\" data-tab=\"html\">HTML<\/button><br \/>\n<button class=\"codepen-tab\" data-tab=\"css\">CSS<\/button><br \/>\n<button class=\"codepen-tab\" data-tab=\"javascript\">JS<\/button>\n<\/div>\n<p><button class=\"codepen-copy-btn\">Copy<\/button>\n<\/div>\n<div class=\"codepen-code-container\">\n<pre class=\"codepen-code active\" data-lang=\"html\">&lt;div class=&quot;interaction-demo&quot;&gt;\n  &lt;button class=&quot;morph-button&quot; id=&quot;morphButton&quot;&gt;\n    &lt;span class=&quot;button-text&quot;&gt;Click to order&lt;\/span&gt;\n    &lt;span class=&quot;button-icon&quot;&gt;&rarr;&lt;\/span&gt;\n    &lt;div class=&quot;button-bg&quot;&gt;&lt;\/div&gt;\n    &lt;div class=&quot;ripple-effect&quot;&gt;&lt;\/div&gt;\n  &lt;\/button&gt;\n  \n  &lt;div class=&quot;status-indicator&quot;&gt;\n    &lt;div class=&quot;status-dot&quot;&gt;&lt;\/div&gt;\n    &lt;span class=&quot;status-text&quot;&gt;Ready&lt;\/span&gt;\n  &lt;\/div&gt;\n&lt;\/div&gt;<\/pre>\n<pre class=\"codepen-code\" data-lang=\"css\">@keyframes ripple { to { transform: scale(4); opacity: 0; } } @keyframes success-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } } @keyframes loading-spin { to { transform: rotate(360deg); } } .interaction-demo { display: flex; flex-direction: column; align-items: center; gap: 30px; padding: 40px; background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%); border-radius: 20px; min-height: 250px; justify-content: center; } .morph-button { position: relative; padding: 16px 32px; border:none; border-radius: 50px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color:white; font-size: 16px; font-weight: 600; cursor: pointer; overflow:hidden; transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); min-width: 200px; display:flex; align-items: center; justify-content: center; gap: 8px; } .morph-button:hover { transform: translateY(-2px); box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4); background: linear-gradient(135deg, #764ba2 0%, #667eea 100%); } .morph-button:active { transform: translateY(0); transition-duration: 0.1s; } .morph-button.loading { background: linear-gradient(135deg, #ff7675 0%, #fd79a8 100%); cursor: not-allowed; animation:none; } .morph-button.loading .button-text::after { content: &#039;&#039;; display: inline-block; width: 12px; height: 12px; border: 2px solid rgba(255,255,255,0.3); border-radius: 50%; border-top-color: white; margin-left: 8px; animation: loading-spin 1s linear infinite; } .morph-button.success { background: linear-gradient(135deg, #00b894 0%, #00cec9 100%); animation: success-pulse 0.6s ease; } .button-icon { transition: transform 0.3s ease; } .morph-button:hover .button-icon { transform: translateX(4px); } .button-bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(255,255,255,0.1); transform: scaleX(0); transform-origin: left; transition: transform 0.3s ease; } .morph-button:hover .button-bg { transform: scaleX(1); } .ripple-effect { position: absolute; border-radius: 50%; background: rgba(255,255,255,0.3); transform: scale(0); animation: ripple 0.6s linear; pointer-events: none; } .status-indicator { display: flex; align-items: center; gap: 10px; font-weight: 500; color: #666; transition: all 0.3s ease; } .status-dot { width: 8px; height: 8px; border-radius: 50%; background: #00b894; transition: all 0.3s ease; } .status-indicator.loading .status-dot { background: #ff7675; animation: loading-spin 1s linear infinite; } .status-indicator.success .status-dot { background: #00cec9; animation: success-pulse 0.6s ease; }<\/pre>\n<pre class=\"codepen-code\" data-lang=\"javascript\">document.getElementById(&#039;morphButton&#039;).addEventListener(&#039;click&#039;, function(e) { const button = this; const buttonText = button.querySelector(&#039;.button-text&#039;); const statusIndicator = document.querySelector(&#039;.status-indicator&#039;); const statusText = document.querySelector(&#039;.status-text&#039;); \/\/ Create the effect ripple const ripple = button.querySelector(&#039;.ripple-effect&#039;); const rect = button.getBoundingClientRect(); const size = Math.max(rect.width, rect.height); const y = e.clientY - rect.top - size \/ 2; &#039;px&#039;; ripple.style.left = x + &#039;px&#039;; ripple.style.top = y + &#039;px&#039;; ripple.style.animation = &#039;none&#039;; ripple.offsetHeight; \/\/ Force reflow ripple.style.animation = &#039;ripple 0.6s linear&#039;; \/\/ Loading state button.classList.add(&#039;loading&#039;); buttonText.textContent = &#039;Processing&#039;; statusIndicator.classList.add(&#039;loading&#039;); statusText.textContent = &#039;Loading...&#039;; \/\/ Simulate processing setTimeout(() =&gt; { button.classList.remove(&#039;loading&#039;); button.classList.add(&#039;success&#039;); buttonText.textContent = &#039;Order validated!&#039;; statusIndicator.classList.remove(&#039;loading&#039;); statusIndicator.classList.add(&#039;success&#039;); statusText.textContent = &#039;Success&#039;; \/\/ Return to initial state setTimeout(() =&gt; { button.classList.remove(&#039;success&#039;); buttonText.textContent = &#039;Click to order&#039;; statusIndicator.classList.remove(&#039;success&#039;); statusText.textContent = &#039;Ready&#039;; }, 2000); }, 2000); });<\/pre>\n<\/div>\n<\/div>\n<div class=\"monaco-sandbox\" data-block-id=\"exercise-4\">\n<div class=\"monaco-header\">\n<div class=\"monaco-tabs\">\n<button class=\"monaco-tab active\" data-lang=\"html\">HTML<\/button><br \/>\n<button class=\"monaco-tab\" data-lang=\"css\">CSS<\/button><br \/>\n<button class=\"monaco-tab\" data-lang=\"javascript\">JS<\/button>\n<\/div>\n<div class=\"monaco-actions\">\n<button class=\"monaco-btn monaco-btn-run\">\u25b6 Run<\/button><br \/>\n<button class=\"monaco-btn monaco-btn-reset\">\u21ba Reset<\/button>\n<\/div>\n<\/div>\n<div class=\"monaco-container\">\n<div class=\"monaco-editor-wrapper\">\n<div class=\"monaco-editor-pane active\" data-lang=\"html\"><\/div>\n<div class=\"monaco-editor-pane\" data-lang=\"css\"><\/div>\n<div class=\"monaco-editor-pane\" data-lang=\"javascript\"><\/div>\n<\/div>\n<div class=\"monaco-preview-wrapper\">\n<div class=\"monaco-preview-header\">Result<\/div>\n<\/div>\n<\/div>\n<div class=\"monaco-status\">\n<span class=\"monaco-status-left\">\u25cf Ready<\/span><br \/>\n<span class=\"monaco-status-right\">Monaco Editor v0.45<\/span>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"wpa-accordion-item\">\n<button class=\"wpa-accordion-header\" data-wpa-target=\"#accordion-22-les-animations-css-avancees-item-5\" aria-expanded=\"false\"><span class=\"wpa-accordion-title\"><span class=\"wpa-accordion-number\">05<\/span> Animation optimization and performance<\/span><span class=\"wpa-accordion-icon\"><\/span><\/button><\/p>\n<div id=\"accordion-22-les-animations-css-avancees-item-5\" class=\"wpa-accordion-body\">\n<div class=\"wpa-accordion-content\">\n<h4>Understanding hardware acceleration<\/h4>\n<p>Performance optimization is crucial for smooth animations, especially on mobile. The CSS properties that trigger hardware (GPU) acceleration are `transform` and `opacity`, as they don&#039;t affect layout or painting. Avoid animating properties like `width`, `height`, `top`, and `left`, which force layout recalculations. The `will-change: transform` property signals to the browser that an animation is about to occur, allowing for optimal preparation. However, overusing `will-change` can consume too much GPU memory. The golden rule is to animate only with `transform` and `opacity` whenever possible.<\/p>\n<h4>Advanced optimization techniques<\/h4>\n<p>The `contain: layout style paint` property tells the browser that the element is self-contained, reducing recalculations on the rest of the page. Complex animations can be broken down into independent layers with `transform: translateZ(0)` to force the creation of a new composition context. Animated images and videos benefit from `image-rendering: crisp-edges` to prevent blurring during transformations. For long animations, use `animation-fill-mode: forwards` rather than keeping the animation active indefinitely. These optimizations ensure 60fps even on less powerful devices.<\/p>\n<div class=\"info-box\">\n<p><strong>Key point<\/strong> : Use DevTools to identify animations that cause repaints or reflows and optimize them by prioritizing transform and opacity.<\/p>\n<\/div>\n<div class=\"tuto-objectif\" style=\"background: #f5f5f5;border-left: 4px solid #667eea;padding: 16px 20px;margin-top: 24px;border-radius: 0 8px 8px 0\">\n<h3 style=\"color: #667eea;margin: 0 0 8px 0;font-size: 16px\">Key points to remember<\/h3>\n<p style=\"margin: 0;color: #333\">The optimization of CSS animations relies on the exclusive use of transform and opacity, hardware acceleration, and intelligent management of composition layers.<\/p>\n<\/div>\n<div class=\"tuto-exercise\" style=\"background: #fff3e0;border-left: 4px solid #ff9800;padding: 16px 20px;margin-top: 20px;border-radius: 0 8px 8px 0\">\n<h4 style=\"color: #ff9800;margin: 0 0 8px 0;font-size: 15px\">\ud83c\udfaf Mini-exercise: High-performance animation with multiple layers<\/h4>\n<p style=\"margin: 0;color: #333;font-size: 14px\">Create a complex animation using only transform and opacity, with layers optimized to maintain 60fps.<\/p>\n<\/div>\n<div class=\"codepen-block\" data-block-id=\"exercise-5\">\n<p class=\"codepen-block-label\">Reference code:<\/p>\n<div class=\"codepen-header\">\n<div class=\"codepen-tabs\">\n<button class=\"codepen-tab active\" data-tab=\"html\">HTML<\/button><br \/>\n<button class=\"codepen-tab\" data-tab=\"css\">CSS<\/button><br \/>\n<button class=\"codepen-tab\" data-tab=\"javascript\">JS<\/button>\n<\/div>\n<p><button class=\"codepen-copy-btn\">Copy<\/button>\n<\/div>\n<div class=\"codepen-code-container\">\n<pre class=\"codepen-code active\" data-lang=\"html\">&lt;div class=&quot;performance-demo&quot;&gt;\n  &lt;div class=&quot;floating-cards-container&quot;&gt;\n    &lt;div class=&quot;floating-card card-1&quot;&gt;\n      &lt;div class=&quot;card-layer bg-layer&quot;&gt;&lt;\/div&gt;\n      &lt;div class=&quot;card-layer content-layer&quot;&gt;\n        &lt;h3&gt;Performance&lt;\/h3&gt;\n        &lt;p&gt;60fps guaranteed&lt;\/p&gt;\n      &lt;\/div&gt;\n      &lt;div class=&quot;card-layer glow-layer&quot;&gt;&lt;\/div&gt;\n    &lt;\/div&gt;\n    \n    &lt;div class=&quot;floating-card card-2&quot;&gt;\n      &lt;div class=&quot;card-layer bg-layer&quot;&gt;&lt;\/div&gt;\n      &lt;div class=&quot;card-layer content-layer&quot;&gt;\n        &lt;h3&gt;Optimization&lt;\/h3&gt;\n        &lt;p&gt;Transform only&lt;\/p&gt;\n      &lt;\/div&gt;\n      &lt;div class=&quot;card-layer glow-layer&quot;&gt;&lt;\/div&gt;\n    &lt;\/div&gt;\n    \n    &lt;div class=&quot;floating-card card-3&quot;&gt;\n      &lt;div class=&quot;card-layer bg-layer&quot;&gt;&lt;\/div&gt;\n      &lt;div class=&quot;card-layer content-layer&quot;&gt;\n        &lt;h3&gt;GPU&lt;\/h3&gt;\n        &lt;p&gt;Acceleration&lt;\/p&gt;\n      &lt;\/div&gt;\n      &lt;div class=&quot;card-layer glow-layer&quot;&gt;&lt;\/div&gt;\n    &lt;\/div&gt;\n  &lt;\/div&gt;\n  \n  &lt;div class=&quot;performance-indicator&quot;&gt;\n    &lt;div class=&quot;fps-counter&quot;&gt;60 FPS&lt;\/div&gt;\n    &lt;div class=&quot;gpu-indicator&quot;&gt;\ud83d\ude80 GPU Accelerated&lt;\/div&gt;\n  &lt;\/div&gt;\n&lt;\/div&gt;<\/pre>\n<pre class=\"codepen-code\" data-lang=\"css\">@keyframes floatAnimation { 0%, 100% { transform: translateY(0px) rotateY(0deg); } 33% { transform: translateY(-20px) rotateY(5deg); } 66% { transform: translateY(-10px) rotateY(-3deg); } } @keyframes glowPulse { 0%, 100% { opacity: 0.3; transform: scale(0.95); } 50% { opacity: 0.6; transform: scale(1.05); } } @keyframes performanceIndicator { 0%, 100% { transform: scale(1); opacity: 0.8; } 50% { transform: scale(1.1); opacity: 1; } } .performance-demo { background: linear-gradient(135deg, #0c0c0c 0%, #1a1a2e 50%, #16213e 100%); min-height: 400px; padding: 40px 20px; border-radius: 20px; display:flex; flex-direction: column; justify-content: space-between; overflow:hidden; perspective: 1200px; } .floating-cards-container { display: flex; justify-content: center; gap: 40px; flex-wrap:wrap; transform-style: preserve-3d; } .floating-card { position: relative; width: 180px; height: 120px; transform-style: preserve-3d; will-change: transform; \/* Crucial optimization for performance *\/ contain: layout style paint; } .floating-card.card-1 { animation: floatAnimation 4s ease-in-out infinite; } .floating-card.card-2 { animation: floatAnimation 4s ease-in-out infinite 1.3s; } .floating-card.card-3 { animation: floatAnimation 4s ease-in-out infinite 2.6s; } .card-layer { position: absolute; width: 100%; height: 100%; border-radius: 16px; backface-visibility: hidden; will-change: transform, opacity; } .bg-layer { background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,0.2); transform: translateZ(0); } .content-layer { display: flex; flex-direction: column; align-items: center; justify-content: center; color:white; text-align: center; transform: translateZ(10px); z-index: 2; } .content-layer h3 { margin: 0 0 8px 0; font-size: 18px; font-weight: 600; text-shadow: 0 2px 10px rgba(0,0,0,0.3); } .content-layer p { margin: 0; font-size: 14px; opacity: 0.8; } .glow-layer { background: radial-gradient(ellipse at center, rgba(102, 126, 234, 0.3) 0%, transparent 70%); transform: translateZ(-5px); animation: glowPulse 3s ease-in-out infinite; } .card-1 .glow-layer { background: radial-gradient(ellipse at center, rgba(102, 126, 234, 0.3) 0%, transparent 70%); } .card-2 .glow-layer { background: radial-gradient(ellipse at center, rgba(245, 87, 108, 0.3) 0%, transparent 70%); } .card-3 .glow-layer { background: radial-gradient(ellipse at center, rgba(0, 206, 201, 0.3) 0%, transparent 70%); } .performance-indicator { display: flex; justify-content: center; gap: 30px; margin-top: 40px; } .fps-counter, .gpu-indicator { padding: 12px 20px; background: rgba(0, 255, 0, 0.1); border: 1px solid rgba(0, 255, 0, 0.3); border-radius: 25px; color: #00ff88; font-weight: 600; font-size: 14px; animation: performanceIndicator 2s ease-in-out infinite; will-change: transform, opacity; } .gpu-indicator { background: rgba(255, 165, 0, 0.1); border-color: rgba(255, 165, 0, 0.3); color: #ffaa00; animation-delay: 1s; } \/* Mobile optimizations *\/ @media (max-width: 768px) { .floating-cards-container { gap: 20px; } .floating-card { width: 140px; height: 100px; } .performance-indicator { flex-direction: column; align-items: center; gap: 15px; } }<\/pre>\n<pre class=\"codepen-code\" data-lang=\"javascript\">\/\/ Real-time performance monitoring class PerformanceMonitor { constructor() { this.fpsCounter = document.querySelector(&#039;.fps-counter&#039;); this.lastTime = performance.now(); this.fps = 0; this.frameCount = 0; this.monitor(); } monitor() { const currentTime = performance.now(); this.frameCount++; if (currentTime &gt;= this.lastTime + 1000) { this.fps = Math.round((this.frameCount * 1000) \/ (currentTime - this.lastTime)); this.fpsCounter.textContent = `${this.fps} FPS`; \/\/ Visual performance indicator if (this.fps &gt;= 55) { this.fpsCounter.style.color = &#039;#00ff88&#039;; this.fpsCounter.style.borderColor = &#039;rgba(0, 255, 0, 0.3)&#039;; } else if (this.fps &gt;= 30) { this.fpsCounter.style.color = &#039;#ffaa00&#039;; this.fpsCounter.style.borderColor = &#039;rgba(255, 165, 0, 0.3)&#039;; } else { this.fpsCounter.style.color = &#039;#ff4757&#039;; this.fpsCounter.style.borderColor = &#039;rgba(255, 71, 87, 0.3)&#039;; } this.lastTime = currentTime; this.frameCount = 0; } requestAnimationFrame(() =&gt; this.monitor()); } } \/\/ Start monitoring new PerformanceMonitor(); \/\/ Pause\/Play animations on click document.querySelector(&#039;.performance-demo&#039;).addEventListener(&#039;click&#039;, function() { const cards = document.querySelectorAll(&#039;.floating-card&#039;); cards.forEach(card =&gt; { const computedStyle = window.getComputedStyle(card); const animationPlayState = computedStyle.animationPlayState; if (animationPlayState === &#039;paused&#039;) { card.style.animationPlayState = &#039;running&#039;; } else { card.style.animationPlayState = &#039;paused&#039;; });<\/pre>\n<\/div>\n<\/div>\n<div class=\"monaco-sandbox\" data-block-id=\"exercise-5\">\n<div class=\"monaco-header\">\n<div class=\"monaco-tabs\">\n<button class=\"monaco-tab active\" data-lang=\"html\">HTML<\/button><br \/>\n<button class=\"monaco-tab\" data-lang=\"css\">CSS<\/button><br \/>\n<button class=\"monaco-tab\" data-lang=\"javascript\">JS<\/button>\n<\/div>\n<div class=\"monaco-actions\">\n<button class=\"monaco-btn monaco-btn-run\">\u25b6 Run<\/button><br \/>\n<button class=\"monaco-btn monaco-btn-reset\">\u21ba Reset<\/button>\n<\/div>\n<\/div>\n<div class=\"monaco-container\">\n<div class=\"monaco-editor-wrapper\">\n<div class=\"monaco-editor-pane active\" data-lang=\"html\"><\/div>\n<div class=\"monaco-editor-pane\" data-lang=\"css\"><\/div>\n<div class=\"monaco-editor-pane\" data-lang=\"javascript\"><\/div>\n<\/div>\n<div class=\"monaco-preview-wrapper\">\n<div class=\"monaco-preview-header\">Result<\/div>\n<\/div>\n<\/div>\n<div class=\"monaco-status\">\n<span class=\"monaco-status-left\">\u25cf Ready<\/span><br \/>\n<span class=\"monaco-status-right\">Monaco Editor v0.45<\/span>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<h2>Summary<\/h2>\n<div class=\"tuto-recap\" style=\"background: #f5f5f5;border-left: 4px solid #9c27b0;padding: 16px 20px;border-radius: 0 8px 8px 0\">\n<h3 style=\"color: #9c27b0;margin: 0 0 12px 0;font-size: 16px\">Key points to remember<\/h3>\n<ul style=\"margin: 0;padding-left: 20px;color: #333\">\n<li><strong>@keyframes and animation<\/strong> CSS animations combine defining the steps with @keyframes and controlling execution via the animation property.<\/li>\n<li><strong>3D Transformations<\/strong> Depth effects require precise management of perspective, transform-style, and backface-visibility for realistic rendering.<\/li>\n<li><strong>Timing functions<\/strong> Custom cubic-bezier() curves and the steps() function allow for the creation of unique and expressive movements.<\/li>\n<li><strong>User interactions<\/strong> Micro-interactions with pseudo-classes and multiple states create engaging and intuitive interfaces.<\/li>\n<li><strong>Performance optimization<\/strong> The exclusive use of transform and opacity, GPU acceleration, and will-change guarantees smooth animations at 60fps.<\/li>\n<\/ul>\n<\/div>\n<h2>Sources<\/h2>\n<div class=\"sources-box\" style=\"background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);border: 1px solid #cbd5e1;border-radius: 12px;padding: 16px;margin-bottom: 24px\">\n<p style=\"color: #64748b;margin: 0 0 12px 0;font-size: 13px\">To deepen your knowledge:<\/p>\n<ul style=\"margin: 0;padding-left: 0\">\n<li style=\"margin-bottom: 8px\">\n<a href=\"https:\/\/developer.mozilla.org\/fr\/docs\/Web\/CSS\/CSS_Animations\/Using_CSS_animations\" target=\"_blank\" rel=\"noopener noreferrer\" style=\"align-items: center;gap: 10px;padding: 10px 14px;background: white;border-radius: 8px;text-decoration: none;color: #1e293b;border: 1px solid #e2e8f0\"><br \/>\n<span style=\"color: #94a3b8\">\ud83d\udd17<\/span><br \/>\n<span style=\"flex: 1;font-weight: 500;color: #0f172a\">Complete Guide to CSS Animations \u2013 MDN Web Docs<\/span><br \/>\n<span style=\"color: #94a3b8\">\u2192<\/span><br \/>\n<\/a>\n<\/li>\n<li style=\"margin-bottom: 0\">\n&lt;a href=&quot;https:\/\/css-tricks.com\/almanac\/properties\/a\/animation\/&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; style=&quot;display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: white; border-radius: 8px; text-decoration: none; color: #1e293b; border:<\/p>\n<\/div>\n<h2>Validate your knowledge<\/h2>\n<p>Test your understanding with this 10-question quiz:<\/p>\n<div id=\"quiz-block-1\" class=\"quiz-container\" data-quiz-json=\"https:\/\/lmspro.fr\/wp-content\/plugins\/generate-article-endpoint\/quiz-data\/en\/quiz-22-les-animations-css-avancees.json\" aria-label=\"Interactive Quiz\"><div class=\"quiz-loading\" role=\"status\" aria-live=\"polite\"><span class=\"quiz-sr-only\">Loading quiz...<\/span><\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>22 Advanced CSS Animations Dive into the fascinating world of advanced CSS animations and discover how to create captivating interactive experiences. Master professional techniques to bring your interfaces to life with fluidity and elegance. Module: Module 1: Web Technical Fundamentals Level: Beginner Duration: 20 minutes Prerequisites: None Objectives\u2026 <a href=\"https:\/\/lmspro.fr\/en\/les-animations-css-avancees-part2\/\" class=\"more-link\">Read More<span class=\"screen-reader-text\"> \u00ab\u00a0Les Animations CSS Avanc\u00e9es Part 2\u00a0\u00bb<\/span> &raquo;<\/a><\/p>","protected":false},"author":1,"featured_media":559,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[96,38],"tags":[34,25,26,132,27,28,133,2],"class_list":["post-558","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-micro-interactions","category-module-3-ux-ui-produit","tag-accessibilite","tag-animation","tag-css","tag-fondamentaux-web","tag-html","tag-javascript","tag-js","tag-ux"],"_links":{"self":[{"href":"https:\/\/lmspro.fr\/en\/wp-json\/wp\/v2\/posts\/558","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lmspro.fr\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lmspro.fr\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lmspro.fr\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lmspro.fr\/en\/wp-json\/wp\/v2\/comments?post=558"}],"version-history":[{"count":4,"href":"https:\/\/lmspro.fr\/en\/wp-json\/wp\/v2\/posts\/558\/revisions"}],"predecessor-version":[{"id":636,"href":"https:\/\/lmspro.fr\/en\/wp-json\/wp\/v2\/posts\/558\/revisions\/636"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lmspro.fr\/en\/wp-json\/wp\/v2\/media\/559"}],"wp:attachment":[{"href":"https:\/\/lmspro.fr\/en\/wp-json\/wp\/v2\/media?parent=558"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lmspro.fr\/en\/wp-json\/wp\/v2\/categories?post=558"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lmspro.fr\/en\/wp-json\/wp\/v2\/tags?post=558"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}