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
- 프론트엔드
- HTML
- xcode
- php
- 개발자
- css3
- jQuery
- 애니메이션
- 백엔드
- Animation
- front-end
- CSS
- IOS
- keyframes
- iPhone
- MAC
- effect
- image
- 풀스택
- react
- hover
- iOS 개발자
- 비전공 개발자
- ipad
- button
- html5
- javascript
- SWIFT
- 비전공자
- 자바스크립트
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 |