Answers for "change background with animation css"

CSS
-1

css animate background color change

#content #nav a {
    background-color: #FF0;
    
    -webkit-transition: background-color 1000ms linear;
    -moz-transition: background-color 1000ms linear;
    -o-transition: background-color 1000ms linear;
    -ms-transition: background-color 1000ms linear;
    transition: background-color 1000ms linear;
}

#content #nav a:hover {
    background-color: #AD310B;
}
Posted by: Guest on August-24-2021
4

animated background css

/*
	use @keyframes and the animation property
	see this code running here: https://codepen.io/hylobates-lar/pen/qBbQeON
*/
html, body {
  width: 100%;
  height:100%;
}

body {
    background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
    background-size: 400% 400%;
    animation: gradient 15s ease infinite;
}

@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}
Posted by: Guest on January-31-2022

Code answers related to "change background with animation css"

Browse Popular Code Answers by Language