<!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>
body{
margin: 0;
padding: 0;
background: #000;
}
.container {
width: 100%;
height : 100vh;
display:flex;
align-items: center;
justify-content: center;
}
button{
position: relative;
cursor: pointer;
border: none;
width: 500px;
height: 200px;
border-radius: 60px;
background: linear-gradient(90deg, #ff00d9, #ff0000, #fda502, #ff00d9);
background-size: 300%;
color:#fff;
font-size: 50px;
letter-spacing: 4px;
}
button::before{
content: '';
position: absolute;
top:0;
left : 0;
right : 0;
bottom: 0;
z-index: -1;
background: linear-gradient(90deg, #ff00d9, #ff0000, #fda502, #ff00d9);
background-size: 300%;
border-radius: 60px;
opacity: 0;
transition: 0.4s;
}
button:hover{
animation: animate 5s linear infinite;
}
button:hover::before{
filter: blur(20px);
opacity: 0.7;
animation: animate 5s linear infinite;
}
@keyframes animate {
0%{
background-position: 0%;
}
100%{
background-position: 300%;
}
}
</style>
<body>
<div class="container">
<button>helloworld</button>
</div>
</body>
</html>
'Web > HTML | CSS|JAVASCRIPT' 카테고리의 다른 글
자바스크립트를 사용하지 않은 슬라이드 이미지 만들기(HTML, CSS) (0) | 2020.07.21 |
---|---|
transfrom, keyframes 도형 회전하기(HTML, CSS) (0) | 2020.07.18 |
hover, transition를 이용한 버튼 (HTML, CSS) (0) | 2020.07.18 |
햄버거 메뉴 토글 기능 만들기(HTML, CSS) (0) | 2020.07.15 |
hover를 이용한 메뉴바 menubar (HTML, CSS) (0) | 2020.07.15 |