{"id":597,"date":"2025-05-19T06:36:46","date_gmt":"2025-05-19T06:36:46","guid":{"rendered":"https:\/\/buhave.com\/courses\/?p=597"},"modified":"2025-05-20T12:57:38","modified_gmt":"2025-05-20T12:57:38","slug":"css-transitions-and-animations","status":"publish","type":"post","link":"https:\/\/buhave.com\/courses\/css\/css-transitions-and-animations\/","title":{"rendered":"CSS Transitions and Animations"},"content":{"rendered":"<h2><strong>CSS Transitions: transition-property, transition-duration, transition-timing-function<\/strong><span style=\"font-weight: 400\"><br \/>\n<\/span><\/h2>\n<p>CSS Transitions enable you to smoothly animate changes to CSS property values over a specified duration, enhancing the visual interactivity and responsiveness of web interfaces.<\/p>\n<h3>What Are CSS Transitions?<\/h3>\n<p>CSS Transitions allow HTML elements to change property values gradually, rather than instantly, when triggered by events like :hover, :focus, or :active.<\/p>\n<p><strong>1. transition-property<\/strong><\/p>\n<p>Specifies the CSS property you want to animate.<\/p>\n<p style=\"text-align: center\"><em>transition-property: background-color;<\/em><\/p>\n<p>You can target specific properties (like width, color, opacity) or use all to apply to every animatable property.<\/p>\n<p><strong>2. transition-duration<\/strong><\/p>\n<p>Defines how long the transition takes to complete.<\/p>\n<p style=\"text-align: center\"><em>transition-duration: 0.5s;<\/em><\/p>\n<ul>\n<li>Use seconds (s) or milliseconds (ms); shorter durations feel snappier, longer durations feel smoother.<\/li>\n<\/ul>\n<p><strong>3. transition-timing-function<\/strong><\/p>\n<p>Controls the speed curve of the transition (how the change progresses over time).<\/p>\n<p><strong>Common values:<\/strong><\/p>\n<ul>\n<li>ease (default): starts slow, speeds up, then slows down<\/li>\n<li>linear: constant speed<\/li>\n<li>ease-in: starts slowly<\/li>\n<li>ease-out: ends slowly<\/li>\n<li>ease-in-out: starts and ends slowly<\/li>\n<li>cubic-bezier(x, y, z, w): custom curve<\/li>\n<\/ul>\n<p style=\"text-align: center\"><em>transition-timing-function: ease-in-out;<\/em><\/p>\n<ul>\n<li>Choose based on the feel you want\u2014snappy, smooth, natural, or custom.<\/li>\n<\/ul>\n<p><strong>Complete Example<\/strong><\/p>\n<p style=\"text-align: center\"><em>button {<\/em><br \/>\n<em>background-color: blue;<\/em><br \/>\n<em>color: white;<\/em><br \/>\n<em>transition-property: background-color;<\/em><br \/>\n<em>transition-duration: 0.3s;<\/em><br \/>\n<em>transition-timing-function: ease-in-out;<\/em><br \/>\n<em>}<\/em><\/p>\n<p style=\"text-align: center\"><em>button:hover {<\/em><br \/>\n<em>background-color: green;<\/em><br \/>\n<em>}<\/em><\/p>\n<p>When the user hovers over the button, the background color changes smoothly over 0.3 seconds with easing.<\/p>\n<p><strong>Shorthand Syntax<\/strong><\/p>\n<p>You can combine all transition properties in one line:<\/p>\n<p style=\"text-align: center\"><em>transition: background-color 0.3s ease-in-out;<\/em><\/p>\n<p>Or apply to multiple properties:<\/p>\n<p style=\"text-align: center\"><em>transition: background-color 0.3s ease, color 0.2s linear;<\/em><\/p>\n<p><strong>Summary Table:<\/strong><\/p>\n<table>\n<thead>\n<tr>\n<th>Property<\/th>\n<th>Purpose<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td class=\"property\">transition-property<\/td>\n<td>The property to animate<\/td>\n<\/tr>\n<tr>\n<td class=\"property\">transition-duration<\/td>\n<td>Duration of the transition<\/td>\n<\/tr>\n<tr>\n<td class=\"property\">transition-timing-function<\/td>\n<td>Speed pattern of the transition<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>Keyframe animations: animation-name, animation-duration, animation-timing-function<\/h2>\n<p>CSS Keyframe Animations allow you to create custom, multi-step animations by defining intermediate states (keyframes) and controlling their timing, sequence, and behavior using animation properties.<\/p>\n<h3>What Are Keyframe Animations?<\/h3>\n<p>Unlike transitions (which animate between two states), keyframe animations let you define multiple stages of an animation with precise control over how an element changes at specific points.<\/p>\n<p><strong>1. animation-name<\/strong><\/p>\n<p>Specifies the name of the keyframe sequence to apply.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<p style=\"text-align: center\"><em>@keyframes fadeIn {<\/em><br \/>\n<em>0% {<\/em><br \/>\n<em>opacity: 0;<\/em><br \/>\n<em>}<\/em><br \/>\n<em>100% {<\/em><br \/>\n<em>opacity: 1;<\/em><br \/>\n<em>}<\/em><br \/>\n<em>}<\/em><\/p>\n<p style=\"text-align: center\"><em>.element {<\/em><br \/>\n<em>animation-name: fadeIn;<\/em><br \/>\n<em>}<\/em><\/p>\n<ul>\n<li>Use @keyframes to define the animation steps and link it with animation-name.<\/li>\n<\/ul>\n<p><strong>2. animation-duration<\/strong><\/p>\n<p>Sets how long the animation should take to complete one cycle.<\/p>\n<p style=\"text-align: center\"><em>.element {<\/em><br \/>\n<em>animation-duration: 2s;<\/em><br \/>\n<em>}<\/em><\/p>\n<ul>\n<li>Accepts time values in s (seconds) or ms (milliseconds).<\/li>\n<\/ul>\n<p><strong>3. animation-timing-function<\/strong><\/p>\n<p>Determines how the animation progresses through time (its acceleration curve).<\/p>\n<p><strong>Common Values:<\/strong><\/p>\n<ul>\n<li>ease (default)<\/li>\n<li>linear<\/li>\n<li>ease-in<\/li>\n<li>ease-out<\/li>\n<li>ease-in-out<\/li>\n<li>cubic-bezier(n,n,n,n) for custom curves<\/li>\n<\/ul>\n<p style=\"text-align: center\"><em>.element {<\/em><br \/>\n<em>animation-timing-function: ease-in-out;<\/em><br \/>\n<em>}<\/em><\/p>\n<ul>\n<li>This affects how smooth or dynamic the animation feels.<\/li>\n<\/ul>\n<p><strong>Full Example:<\/strong><\/p>\n<p style=\"text-align: center\"><em>@keyframes slideUp {<\/em><br \/>\n<em>0% {<\/em><br \/>\n<em>transform: translateY(100px);<\/em><br \/>\n<em>opacity: 0;<\/em><br \/>\n<em>}<\/em><br \/>\n<em>100% {<\/em><br \/>\n<em>transform: translateY(0);<\/em><br \/>\n<em>opacity: 1;<\/em><br \/>\n<em>}<\/em><br \/>\n<em>}<\/em><\/p>\n<p style=\"text-align: center\"><em>.box {<\/em><br \/>\n<em>animation-name: slideUp;<\/em><br \/>\n<em>animation-duration: 1.5s;<\/em><br \/>\n<em>animation-timing-function: ease;<\/em><br \/>\n<em>}<\/em><\/p>\n<ul>\n<li>This will animate the .box element sliding up into view with a fade-in effect over 1.5 seconds.<\/li>\n<\/ul>\n<p><strong>Shorthand Syntax<\/strong><\/p>\n<p>Combine multiple animation properties into a single line:<\/p>\n<p style=\"text-align: center\"><em>animation: slideUp 1.5s ease;<\/em><\/p>\n<p><strong>Summary Table:<\/strong><\/p>\n<table>\n<thead>\n<tr>\n<th>Property<\/th>\n<th>Purpose<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td class=\"property\">animation-name<\/td>\n<td>Binds the element to a <span class=\"code\">@keyframes<\/span> rule<\/td>\n<\/tr>\n<tr>\n<td class=\"property\">animation-duration<\/td>\n<td>Sets how long one animation cycle takes<\/td>\n<\/tr>\n<tr>\n<td class=\"property\">animation-timing-function<\/td>\n<td>Defines the pacing curve of the animation<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>Practical animation use cases: hover effects, slide-in animations<\/h2>\n<p>CSS animations are widely used to improve user experience, draw attention to UI elements, and add interactivity to web pages. Below are two popular and practical use cases: hover effects and slide-in animations.<\/p>\n<h3>1. Hover Effects (Interactive Animations)<\/h3>\n<p>Use Case: Enhance buttons, images, or links with visual feedback when hovered.<\/p>\n<p><strong>Example: Button Hover Zoom<\/strong><\/p>\n<p style=\"text-align: center\"><em>.button {<\/em><br \/>\n<em>padding: 12px 24px;<\/em><br \/>\n<em>background-color: royalblue;<\/em><br \/>\n<em>color: white;<\/em><br \/>\n<em>border: none;<\/em><br \/>\n<em>transition: transform 0.3s ease;<\/em><br \/>\n<em>}<\/em><\/p>\n<p style=\"text-align: center\"><em>.button:hover {<\/em><br \/>\n<em>transform: scale(1.1);<\/em><br \/>\n<em>}<\/em><\/p>\n<ul>\n<li>This makes the button &#8220;grow&#8221; slightly on hover, signaling interactivity.<\/li>\n<\/ul>\n<p><strong>Example:<\/strong> <strong>Icon Color Change on Hover<\/strong><\/p>\n<p style=\"text-align: center\"><em>.icon {<\/em><br \/>\n<em>color: gray;<\/em><br \/>\n<em>transition: color 0.3s ease;<\/em><br \/>\n<em>}<\/em><\/p>\n<p style=\"text-align: center\"><em>.icon:hover {<\/em><br \/>\n<em>color: crimson;<\/em><br \/>\n<em>}<\/em><\/p>\n<ul>\n<li>Smooth color change on hover adds a dynamic, polished feel.<\/li>\n<\/ul>\n<h3>2. Slide-In Animations (Entrance Effects)<\/h3>\n<p>Use Case: Make elements enter the page from the side or bottom, often used in modals, menus, or scroll animations.<\/p>\n<p><strong>Example: Slide In from Left<\/strong><\/p>\n<p style=\"text-align: center\"><em>@keyframes slideInLeft {<\/em><br \/>\n<em>0% {<\/em><br \/>\n<em>transform: translateX(-100%);<\/em><br \/>\n<em>opacity: 0;<\/em><br \/>\n<em>}<\/em><br \/>\n<em>100% {<\/em><br \/>\n<em>transform: translateX(0);<\/em><br \/>\n<em>opacity: 1;<\/em><br \/>\n<em>}<\/em><br \/>\n<em>}<\/em><\/p>\n<p style=\"text-align: center\"><em>.sidebar {<\/em><br \/>\n<em>animation: slideInLeft 0.8s ease-out forwards;<\/em><br \/>\n<em>}<\/em><\/p>\n<ul>\n<li>The .sidebar slides in smoothly from the left when loaded.<\/li>\n<\/ul>\n<p><strong>Example: Slide In on Scroll (with JavaScript trigger)<\/strong><br \/>\n<strong>CSS:<\/strong><\/p>\n<p style=\"text-align: center\"><em>@keyframes slideInUp {<\/em><br \/>\n<em>from {<\/em><br \/>\n<em>transform: translateY(50px);<\/em><br \/>\n<em>opacity: 0;<\/em><br \/>\n<em>}<\/em><br \/>\n<em>to {<\/em><br \/>\n<em>transform: translateY(0);<\/em><br \/>\n<em>opacity: 1;<\/em><br \/>\n<em>}<\/em><br \/>\n<em>}<\/em><\/p>\n<p style=\"text-align: center\"><em>.slide-element {<\/em><br \/>\n<em>opacity: 0;<\/em><br \/>\n<em>animation: slideInUp 0.6s ease-out forwards;<\/em><br \/>\n<em>}<\/em><\/p>\n<p><strong>JavaScript to trigger when in view:<\/strong><\/p>\n<p style=\"text-align: center\"><em>const element = document.querySelector(&#8216;.slide-element&#8217;);<\/em><\/p>\n<p style=\"text-align: center\"><em>window.addEventListener(&#8216;scroll&#8217;, () =&gt; {<\/em><br \/>\n<em>if (element.getBoundingClientRect().top &lt; window.innerHeight) {<\/em><br \/>\n<em>element.classList.add(&#8216;animate&#8217;);<\/em><br \/>\n<em>}<\/em><br \/>\n<em>});<\/em><\/p>\n<ul>\n<li>The element animates in when it comes into the viewport.<\/li>\n<\/ul>\n<p><strong>Summary:<\/strong><\/p>\n<table>\n<thead>\n<tr>\n<th>Use Case<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td class=\"use-case\">Hover Effects<\/td>\n<td>Immediate feedback, improves UI responsiveness and clarity<\/td>\n<\/tr>\n<tr>\n<td class=\"use-case\">Slide-In<\/td>\n<td>Engaging entrance effects for components or content<\/td>\n<\/tr>\n<tr>\n<td class=\"use-case\">Scroll Animations<\/td>\n<td>Enhance storytelling or draw attention dynamically<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Would you like a live demo setup using HTML + CSS + JavaScript, or a practice challenge using these animations?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>CSS Transitions: transition-property, transition-duration, transition-timing-function CSS Transitions enable you to smoothly animate changes to CSS property values over a specified duration, enhancing the visual interactivity and responsiveness of web interfaces. What Are CSS Transitions? CSS Transitions allow HTML elements to change property values gradually, rather<\/p>\n","protected":false},"author":1,"featured_media":598,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[],"class_list":["post-597","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-css"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>CSS Transitions and Animations - CSS Course<\/title>\n<meta name=\"description\" content=\"CSS transitions and animations enable smooth, interactive visual changes to elements, enhancing user experience with fluid motion effects.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/buhave.com\/courses\/css\/css-transitions-and-animations\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"CSS Transitions and Animations - CSS Course\" \/>\n<meta property=\"og:description\" content=\"CSS transitions and animations enable smooth, interactive visual changes to elements, enhancing user experience with fluid motion effects.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/buhave.com\/courses\/css\/css-transitions-and-animations\/\" \/>\n<meta property=\"og:site_name\" content=\"BUHAVE\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/BeYouHave\/\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/naveedsafdarawan\/\" \/>\n<meta property=\"article:published_time\" content=\"2025-05-19T06:36:46+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-05-20T12:57:38+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/buhave.com\/courses\/wp-content\/uploads\/2025\/04\/CSS-Transitions-and-Animations.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/webp\" \/>\n<meta name=\"author\" content=\"Naveed Safdar\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Naveed Safdar\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/buhave.com\\\/courses\\\/css\\\/css-transitions-and-animations\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/buhave.com\\\/courses\\\/css\\\/css-transitions-and-animations\\\/\"},\"author\":{\"name\":\"Naveed Safdar\",\"@id\":\"https:\\\/\\\/buhave.com\\\/courses\\\/#\\\/schema\\\/person\\\/04fe0254e118521c9fbb3da39de5acca\"},\"headline\":\"CSS Transitions and Animations\",\"datePublished\":\"2025-05-19T06:36:46+00:00\",\"dateModified\":\"2025-05-20T12:57:38+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/buhave.com\\\/courses\\\/css\\\/css-transitions-and-animations\\\/\"},\"wordCount\":765,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/buhave.com\\\/courses\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/buhave.com\\\/courses\\\/css\\\/css-transitions-and-animations\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/buhave.com\\\/courses\\\/wp-content\\\/uploads\\\/2025\\\/04\\\/CSS-Transitions-and-Animations.webp\",\"articleSection\":[\"CSS Course\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/buhave.com\\\/courses\\\/css\\\/css-transitions-and-animations\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/buhave.com\\\/courses\\\/css\\\/css-transitions-and-animations\\\/\",\"url\":\"https:\\\/\\\/buhave.com\\\/courses\\\/css\\\/css-transitions-and-animations\\\/\",\"name\":\"CSS Transitions and Animations - CSS Course\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/buhave.com\\\/courses\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/buhave.com\\\/courses\\\/css\\\/css-transitions-and-animations\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/buhave.com\\\/courses\\\/css\\\/css-transitions-and-animations\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/buhave.com\\\/courses\\\/wp-content\\\/uploads\\\/2025\\\/04\\\/CSS-Transitions-and-Animations.webp\",\"datePublished\":\"2025-05-19T06:36:46+00:00\",\"dateModified\":\"2025-05-20T12:57:38+00:00\",\"description\":\"CSS transitions and animations enable smooth, interactive visual changes to elements, enhancing user experience with fluid motion effects.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/buhave.com\\\/courses\\\/css\\\/css-transitions-and-animations\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/buhave.com\\\/courses\\\/css\\\/css-transitions-and-animations\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/buhave.com\\\/courses\\\/css\\\/css-transitions-and-animations\\\/#primaryimage\",\"url\":\"https:\\\/\\\/buhave.com\\\/courses\\\/wp-content\\\/uploads\\\/2025\\\/04\\\/CSS-Transitions-and-Animations.webp\",\"contentUrl\":\"https:\\\/\\\/buhave.com\\\/courses\\\/wp-content\\\/uploads\\\/2025\\\/04\\\/CSS-Transitions-and-Animations.webp\",\"width\":1200,\"height\":628,\"caption\":\"CSS Transitions and Animations\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/buhave.com\\\/courses\\\/css\\\/css-transitions-and-animations\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Courses\",\"item\":\"https:\\\/\\\/buhave.com\\\/courses\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"CSS Course\",\"item\":\"https:\\\/\\\/buhave.com\\\/courses\\\/learn\\\/css\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"CSS Transitions and Animations\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/buhave.com\\\/courses\\\/#website\",\"url\":\"https:\\\/\\\/buhave.com\\\/courses\\\/\",\"name\":\"BUHAVE\",\"description\":\"Courses - Learn Online for Free\",\"publisher\":{\"@id\":\"https:\\\/\\\/buhave.com\\\/courses\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/buhave.com\\\/courses\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/buhave.com\\\/courses\\\/#organization\",\"name\":\"BUHAVE\",\"url\":\"https:\\\/\\\/buhave.com\\\/courses\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/buhave.com\\\/courses\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/buhave.com\\\/courses\\\/wp-content\\\/uploads\\\/2025\\\/03\\\/buhave-course.webp\",\"contentUrl\":\"https:\\\/\\\/buhave.com\\\/courses\\\/wp-content\\\/uploads\\\/2025\\\/03\\\/buhave-course.webp\",\"width\":375,\"height\":75,\"caption\":\"BUHAVE\"},\"image\":{\"@id\":\"https:\\\/\\\/buhave.com\\\/courses\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/BeYouHave\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/buhave\",\"https:\\\/\\\/www.youtube.com\\\/@buhave\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/buhave.com\\\/courses\\\/#\\\/schema\\\/person\\\/04fe0254e118521c9fbb3da39de5acca\",\"name\":\"Naveed Safdar\",\"description\":\"I\u2019m Naveed Safdar - SEO Manager with over 10 years of experience in SEO and Digital Marketing. I\u2019ve had the privilege of working with leading national and international companies including Grafdom, PakWheels, Systems Limited, Confiz, Educative, and Dubizzle Labs. My expertise spans technical SEO, content strategy, organic growth, and performance analytics - helping businesses improve visibility, traffic, and ROI.\",\"sameAs\":[\"https:\\\/\\\/www.linkedin.com\\\/in\\\/naveedsafdar\\\/\",\"https:\\\/\\\/www.facebook.com\\\/naveedsafdarawan\\\/\",\"https:\\\/\\\/www.youtube.com\\\/@naveedsafdar\"],\"url\":\"https:\\\/\\\/buhave.com\\\/courses\\\/author\\\/naveed-safdar\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"CSS Transitions and Animations - CSS Course","description":"CSS transitions and animations enable smooth, interactive visual changes to elements, enhancing user experience with fluid motion effects.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/buhave.com\/courses\/css\/css-transitions-and-animations\/","og_locale":"en_US","og_type":"article","og_title":"CSS Transitions and Animations - CSS Course","og_description":"CSS transitions and animations enable smooth, interactive visual changes to elements, enhancing user experience with fluid motion effects.","og_url":"https:\/\/buhave.com\/courses\/css\/css-transitions-and-animations\/","og_site_name":"BUHAVE","article_publisher":"https:\/\/www.facebook.com\/BeYouHave\/","article_author":"https:\/\/www.facebook.com\/naveedsafdarawan\/","article_published_time":"2025-05-19T06:36:46+00:00","article_modified_time":"2025-05-20T12:57:38+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/buhave.com\/courses\/wp-content\/uploads\/2025\/04\/CSS-Transitions-and-Animations.webp","type":"image\/webp"}],"author":"Naveed Safdar","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Naveed Safdar","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/buhave.com\/courses\/css\/css-transitions-and-animations\/#article","isPartOf":{"@id":"https:\/\/buhave.com\/courses\/css\/css-transitions-and-animations\/"},"author":{"name":"Naveed Safdar","@id":"https:\/\/buhave.com\/courses\/#\/schema\/person\/04fe0254e118521c9fbb3da39de5acca"},"headline":"CSS Transitions and Animations","datePublished":"2025-05-19T06:36:46+00:00","dateModified":"2025-05-20T12:57:38+00:00","mainEntityOfPage":{"@id":"https:\/\/buhave.com\/courses\/css\/css-transitions-and-animations\/"},"wordCount":765,"commentCount":0,"publisher":{"@id":"https:\/\/buhave.com\/courses\/#organization"},"image":{"@id":"https:\/\/buhave.com\/courses\/css\/css-transitions-and-animations\/#primaryimage"},"thumbnailUrl":"https:\/\/buhave.com\/courses\/wp-content\/uploads\/2025\/04\/CSS-Transitions-and-Animations.webp","articleSection":["CSS Course"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/buhave.com\/courses\/css\/css-transitions-and-animations\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/buhave.com\/courses\/css\/css-transitions-and-animations\/","url":"https:\/\/buhave.com\/courses\/css\/css-transitions-and-animations\/","name":"CSS Transitions and Animations - CSS Course","isPartOf":{"@id":"https:\/\/buhave.com\/courses\/#website"},"primaryImageOfPage":{"@id":"https:\/\/buhave.com\/courses\/css\/css-transitions-and-animations\/#primaryimage"},"image":{"@id":"https:\/\/buhave.com\/courses\/css\/css-transitions-and-animations\/#primaryimage"},"thumbnailUrl":"https:\/\/buhave.com\/courses\/wp-content\/uploads\/2025\/04\/CSS-Transitions-and-Animations.webp","datePublished":"2025-05-19T06:36:46+00:00","dateModified":"2025-05-20T12:57:38+00:00","description":"CSS transitions and animations enable smooth, interactive visual changes to elements, enhancing user experience with fluid motion effects.","breadcrumb":{"@id":"https:\/\/buhave.com\/courses\/css\/css-transitions-and-animations\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/buhave.com\/courses\/css\/css-transitions-and-animations\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/buhave.com\/courses\/css\/css-transitions-and-animations\/#primaryimage","url":"https:\/\/buhave.com\/courses\/wp-content\/uploads\/2025\/04\/CSS-Transitions-and-Animations.webp","contentUrl":"https:\/\/buhave.com\/courses\/wp-content\/uploads\/2025\/04\/CSS-Transitions-and-Animations.webp","width":1200,"height":628,"caption":"CSS Transitions and Animations"},{"@type":"BreadcrumbList","@id":"https:\/\/buhave.com\/courses\/css\/css-transitions-and-animations\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Courses","item":"https:\/\/buhave.com\/courses\/"},{"@type":"ListItem","position":2,"name":"CSS Course","item":"https:\/\/buhave.com\/courses\/learn\/css\/"},{"@type":"ListItem","position":3,"name":"CSS Transitions and Animations"}]},{"@type":"WebSite","@id":"https:\/\/buhave.com\/courses\/#website","url":"https:\/\/buhave.com\/courses\/","name":"BUHAVE","description":"Courses - Learn Online for Free","publisher":{"@id":"https:\/\/buhave.com\/courses\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/buhave.com\/courses\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/buhave.com\/courses\/#organization","name":"BUHAVE","url":"https:\/\/buhave.com\/courses\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/buhave.com\/courses\/#\/schema\/logo\/image\/","url":"https:\/\/buhave.com\/courses\/wp-content\/uploads\/2025\/03\/buhave-course.webp","contentUrl":"https:\/\/buhave.com\/courses\/wp-content\/uploads\/2025\/03\/buhave-course.webp","width":375,"height":75,"caption":"BUHAVE"},"image":{"@id":"https:\/\/buhave.com\/courses\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/BeYouHave\/","https:\/\/www.linkedin.com\/company\/buhave","https:\/\/www.youtube.com\/@buhave"]},{"@type":"Person","@id":"https:\/\/buhave.com\/courses\/#\/schema\/person\/04fe0254e118521c9fbb3da39de5acca","name":"Naveed Safdar","description":"I\u2019m Naveed Safdar - SEO Manager with over 10 years of experience in SEO and Digital Marketing. I\u2019ve had the privilege of working with leading national and international companies including Grafdom, PakWheels, Systems Limited, Confiz, Educative, and Dubizzle Labs. My expertise spans technical SEO, content strategy, organic growth, and performance analytics - helping businesses improve visibility, traffic, and ROI.","sameAs":["https:\/\/www.linkedin.com\/in\/naveedsafdar\/","https:\/\/www.facebook.com\/naveedsafdarawan\/","https:\/\/www.youtube.com\/@naveedsafdar"],"url":"https:\/\/buhave.com\/courses\/author\/naveed-safdar\/"}]}},"_links":{"self":[{"href":"https:\/\/buhave.com\/courses\/wp-json\/wp\/v2\/posts\/597","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/buhave.com\/courses\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/buhave.com\/courses\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/buhave.com\/courses\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/buhave.com\/courses\/wp-json\/wp\/v2\/comments?post=597"}],"version-history":[{"count":1,"href":"https:\/\/buhave.com\/courses\/wp-json\/wp\/v2\/posts\/597\/revisions"}],"predecessor-version":[{"id":599,"href":"https:\/\/buhave.com\/courses\/wp-json\/wp\/v2\/posts\/597\/revisions\/599"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/buhave.com\/courses\/wp-json\/wp\/v2\/media\/598"}],"wp:attachment":[{"href":"https:\/\/buhave.com\/courses\/wp-json\/wp\/v2\/media?parent=597"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/buhave.com\/courses\/wp-json\/wp\/v2\/categories?post=597"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/buhave.com\/courses\/wp-json\/wp\/v2\/tags?post=597"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}