본문 바로가기

IT/Develop

CSS Gradient Background Animation

 

<div class="container">
  <h1>CSS Gradient Background Animation</h1>  
</div>
@import url('https://fonts.googleapis.com/css?family=Lato&display=swap');
body {
	margin: 0;
	width: 100%;
	height: 100vh;
	font-family: 'Lato', sans-serif;
	color: #fff;
	background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
	background-size: 400% 400%;
	animation: gradientBG 15s ease infinite;
}

@keyframes gradientBG {
	0% {
		background-position: 0% 50%;
	}
	50% {
		background-position: 100% 50%;
	}
	100% {
		background-position: 0% 50%;
	}
}

.container {
	width: 100%;
	position: absolute;
	top: 35%;
	text-align: center;
	
}

'IT > Develop' 카테고리의 다른 글

Accordion CSS, JS  (0) 2019.10.22
Bootstrap 4 Modal  (0) 2019.10.22
Bootstrap 4 Popover  (0) 2019.10.22