<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<style>
*{
margin: 0;
padding: 0;
box-sizing: border-box;
}
.wi{
justify-content: center;
align-items: center;
width: 100%;
height: 100%;
top: 50%;
left: 50%;
background-color: #6e6438;
position: absolute;
transform: translate(-50%, -50%);
display: flex;
}
.box{
width: 200px;
height: 200px;
animation: rotate 2.5s infinite;
background: linear-gradient(to right, rgb(90, 92, 231) 50%, #f16d6d 50%);
background-size: 200% 100%;
background-position:right bottom;
transform: rotate(-90deg);
border-radius: 15%;
}
@keyframes rotate{
0%{
background-position: right bottom;
}
50%{
background-position: left bottom;
transform: rotate(90deg);
}
100%{
background-position: right bottom;
transform: rotate(270deg);
}
}
</style>
<body>
<div class="wi">
<div class="box"></div>
</div>
</body>
</html>
'Web > HTML | CSS|JAVASCRIPT' 카테고리의 다른 글
간단한 hover 기능 구현(HTML, CSS) (0) | 2020.07.27 |
---|---|
자바스크립트를 사용하지 않은 슬라이드 이미지 만들기(HTML, CSS) (0) | 2020.07.21 |
hover, transition를 이용한 버튼 (HTML, CSS) (0) | 2020.07.18 |
hover, keyframes를 이용한 버튼(HTML, CSS) (0) | 2020.07.15 |
햄버거 메뉴 토글 기능 만들기(HTML, CSS) (0) | 2020.07.15 |