<!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;
}
.container{
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background-color: rgb(54, 52, 42);
}
.btn{
font-size: 20px;
font-weight: bold;
letter-spacing: 4px;
text-transform: uppercase;
padding: 30px 35px;
background-color: transparent;
color: rgba(68, 177, 26, 0.678);
border: 3px solid rgb(255, 0, 0);
background-image: linear-gradient(
120deg, transparent 0%, transparent 50%, rgb(241, 160, 237) 50%
);
background-size: 230%;
transition: all, 0.5s;
}
.btn:hover{
background-position: 100%;
}
</style>
<body>
<div class="container">
<button class="btn">Css Hover</button>
</div>
</body>
</html>
'Web > HTML | CSS|JAVASCRIPT' 카테고리의 다른 글
자바스크립트를 사용하지 않은 슬라이드 이미지 만들기(HTML, CSS) (0) | 2020.07.21 |
---|---|
transfrom, keyframes 도형 회전하기(HTML, CSS) (0) | 2020.07.18 |
hover, keyframes를 이용한 버튼(HTML, CSS) (0) | 2020.07.15 |
햄버거 메뉴 토글 기능 만들기(HTML, CSS) (0) | 2020.07.15 |
hover를 이용한 메뉴바 menubar (HTML, CSS) (0) | 2020.07.15 |