<!DOCTYPE html>
<html>
<head>
<meta name="fuzzy" content="maxDifference=0-1; totalPixels=0-10000" />
<title>CSS Filters Animation: Grayscale</title>
<link rel="author" title="Gunther Brunner" href="mailto:[email protected]">
<link rel="reviewer" title="Dirk Schulze" href="mailto:[email protected]">
<link rel="reviewer" title="Rebecca Hauck" href="mailto:[email protected]">
<link rel="help" href="http://www.w3.org/TR/filter-effects-1/#FilterProperty">
<link rel="help" href="https://www.w3.org/TR/filter-effects-1/#funcdef-filter-grayscale">
<link rel="help" href="http://www.w3.org/TR/css3-animations/#animations">
<link rel="match" href="css-filters-animation-grayscale-ref.html">
<meta name="assert" content="The blue square should be half-grayscaled">
<style type="text/css">
@keyframes animate {
0% {
filter: grayscale(100%);
}
100% {
filter: none;
}
}
.square {
width: 100px;
height: 100px;
background: blue;
animation-name: animate;
animation-play-state: paused;
animation-delay: -2s;
animation-duration: 4s;
animation-timing-function: linear;
}
</style>
</head>
<body>
<p>You should see a dark blue rectangle.</p>
<div class="square"></div>
</body>
</html>