비전공자 개발일기

Shadow BTN 본문

HTML _CSS

Shadow BTN

HiroDaegu 2022. 4. 22. 00:32
728x90
SMALL

버튼 hover시 상태
평소 버튼 상태

<!DOCTYPE html>
<html lang="ko">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Shadow BTN</title>
  <link rel="stylesheet" href="style.css">
</head>
<body>
  <button class="menu_btn">MENU</button>
</body>
</html>
body {
  background-color: #000;
}

.menu_btn {
  width: 100px;
  height: 40px;
  position: relative;
  color: #808080;
  margin: 20%;
  background-color: #000;
  border: 1px solid #808080;
  border-radius: 5px;
  transition: all 1s;
}

.menu_btn:hover {
  color: #000;
  border-color: #000;
  background-color: #fff;
  font-weight: 700;
}

.menu_btn::before {
  content: "";
  position: absolute;
  top: 80%;
  left: 0;
  width: 100px;
  height: 40px;
  transform: perspective(1em) rotateX(40deg) scale(1, .35);
  filter: blur(1em);
  transition: all 1s;
}

.menu_btn:hover::before {
  background-color: #808080;
  top: 120%;
}
728x90
LIST

'HTML _CSS' 카테고리의 다른 글

Gradient Background Animation  (0) 2022.04.25
Text Hover Effect & Shake On Invaild Input  (0) 2022.04.23
Edge Motion  (0) 2022.04.20
Link Hover Animation  (0) 2022.04.19
TEXT OVERFLOW & LOADING ANIMATION  (0) 2022.04.17