Filter Animation

Developer
Size
2,234 Kb
Views
34,408

How do I make an filter animation?

Almanac Entry for CSS Filters http://css-tricks.com/almanac/properties/f/filters-css. What is a filter animation? How do you make a filter animation? This script and codes were developed by GRAY GHOST on 11 August 2022, Thursday.

Filter Animation Previews

Filter Animation - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Filter Animation</title> <script src="http://s.codepen.io/assets/libs/modernizr.js" type="text/javascript"></script> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <style> /* NOTE: The styles were added inline because Prefixfree needs access to your styles and they must be inlined if they are on local disk! */ button { position: absolute; top: 10px; right: 10px; z-index: 1;
}
img { display: block; width: 100%; }
img.animated { -webkit-animation: filter-animation 5s infinite;
}
@-webkit-keyframes filter-animation { 0% { -webkit-filter: sepia(0) saturate(2); } 50% { -webkit-filter: sepia(1) saturate(8); } 100% { -webkit-filter: sepia(0) saturate(2); }
} </style> <script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
</head>
<body> <button>Click to Animate</button>
<img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/392/redwood-ukulele-top.jpg" alt="ukulele"> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>

Filter Animation - Script Codes CSS Codes

button { position: absolute; top: 10px; right: 10px; z-index: 1;
}
img { display: block; width: 100%; }
img.animated { -webkit-animation: filter-animation 5s infinite;
}
@-webkit-keyframes filter-animation { 0% { -webkit-filter: sepia(0) saturate(2); } 50% { -webkit-filter: sepia(1) saturate(8); } 100% { -webkit-filter: sepia(0) saturate(2); }
}

Filter Animation - Script Codes JS Codes

function activateFilterAnimation() { $('img').toggleClass('animated');
}
$('button').on('click', activateFilterAnimation);
Filter Animation - Script Codes
Filter Animation - Script Codes
Home Page Home
Developer GRAY GHOST
Username grayghostvisuals
Uploaded August 11, 2022
Rating 3.5
Size 2,234 Kb
Views 34,408
Do you need developer help for Filter Animation?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

GRAY GHOST (grayghostvisuals) Script Codes
Create amazing blog posts with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!