The Wayback Machine - https://web.archive.org/web/20240118171551/https://www.geeksforgeeks.org/css-will-change-property/
Open In App
Related Articles

CSS will-change property

Improve
Improve
Improve
Like Article
Like
Save Article
Save
Report issue
Report

The will-change property is the replacement of animation in few cases, all the animation will look so jumpy a few times when the page took time to load. But in the case of will-change, those animated things will perform smoothly. 

Syntax:

will-change: auto | <animateable-feature>#

Property values:

  • auto: Here the developer should apply whatever heuristics and optimizations it normally does.
  • <animateable-feature>: Here the developer can define what kind of animation developer want to show.

Example: This example illustrates the will-change property. 

HTML




<!DOCTYPE html> 
<html> 
<head> 
    <title> 
        CSS | will-change property 
    </title> 
    <style> 
        h1 { 
            color: green; 
        } 
        .left{
            will-change: transform;
            transition: 1s;
        }
        .left:hover { 
            transform: rotateX(45deg); 
        } 
    </style> 
</head> 
<body> 
    <center> 
        <h1>GeeksforGeeks</h1> 
        <h4>CSS | will-change property</h4> 
        <div> 
            <img class="left" src= 
                alt="Sample image"> 
            <img class="right" src= 
                alt="Sample image"> 
        </div> 
    </center> 
<body> 
</html>


Output:

  

Supported Browsers: The browsers supported by CSS will-change property are listed below:

  • Google Chrome 36+
  • Edge 79+
  • Firefox 36+
  • Safari 24+
  • Opera 9.1+

Learn to code easily with our course Coding for Everyone. This course is accessible and designed for everyone, even if you're new to coding. Start today and join millions on a journey to improve your skills!

Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out - check it out now!

Commit to GfG's Three-90 Challenge! Purchase a course, complete 90% in 90 days, and save 90% cost click here to explore.
Last Updated : 06 Jun, 2023
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads
Complete Tutorials