250x250
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
Tags
- jQuery
- Animation
- css3
- front-end
- 개발자
- 풀스택
- keyframes
- react
- javascript
- MAC
- html5
- iOS 개발자
- SWIFT
- xcode
- 자바스크립트
- iPhone
- 비전공 개발자
- php
- IOS
- image
- hover
- button
- effect
- 비전공자
- ipad
- CSS
- HTML
- 애니메이션
- 프론트엔드
- 백엔드
Archives
- Today
- Total
비전공자 개발일기
Bell Animation 본문
728x90
SMALL
<style>
* {
margin: 100px auto;
}
.icon-wrapper {
width: 50px;
height: 50px;
position: relative;
}
.icon-wrapper::after {
content: attr(data-number);
width: 20px;
height: 20px;
background-color: #d32b2b;
color: #fff;
display: grid;
place-content: center;
border-radius: 50%;
position: absolute;
top: 104px;
right: 0;
opacity: 0;
transform: translateY(3px);
}
.icon-wrapper:hover::after {
opacity: 1;
transform: translateY(0);
transition: opacity .25s;
transform: .25s;
}
.bell-icon {
max-width: 100%;
}
.icon-wrapper:hover .bell-icon {
animation: shake 1s forwards;
}
@keyframes shake {
10% {
transform: rotate(15deg);
}
20% {
transform: rotate(-15deg);
}
30% {
transform: rotate(15deg);
}
50% {
transform: rotate(0deg);
}
}
</style>
<div class="icon-wrapper" data-number="1">
<img src="./images/bell-regular.svg" alt="" class="bell-icon">
</div>
728x90
LIST
'HTML _CSS' 카테고리의 다른 글
Card Animation (0) | 2022.04.15 |
---|---|
Button Purse AniMation (0) | 2022.04.14 |
Loading Animation (0) | 2022.04.12 |
New HTML5 Tags with no CSS & JS (0) | 2022.01.17 |
HTML CSS - Dropdown menu Hover (0) | 2021.10.16 |