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 |
Tags
- Animation
- button
- html5
- front-end
- 비전공 개발자
- HTML
- keyframes
- css3
- 애니메이션
- 풀스택
- 백엔드
- 개발자
- 프론트엔드
- IOS
- ipad
- iPhone
- iOS 개발자
- jQuery
- image
- SWIFT
- 자바스크립트
- effect
- hover
- react
- CSS
- 비전공자
- xcode
- php
- MAC
- javascript
Archives
- Today
- Total
비전공자 개발일기
Cocacola 본문
728x90
SMALL
<!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>COCACOLA</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="card">
<div class="circle" style="--clr: #F40103;">
<img src="cocacola_logo.png" alt="logo" class="logo">
</div>
<div class="content">
<h2>cocacola</h2>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Ducimus reprehenderit ex iste ea nobis, quis blanditiis amet nemo, aspernatur hic dolore commodi quia voluptatum adipisci soluta doloribus iusto, neque ipsa!</p>
<a href="#">Explore More</a>
</div>
<div>
<img src="cocacola.png" alt="cocacola" class="product_img">
</div>
</div>
</body>
</html>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
background-color: #151515;
}
.card {
position: relative;
width: 350px;
height: 350px;
display: flex;
justify-content: center;
align-items: center;
transition-delay: .5s;
border-radius: 20px;
}
.card:hover {
width: 600px;
transition-delay: .5s;
}
.card .circle {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
border-radius: 20px;
display: flex;
justify-content: center;
align-items: center;
}
.card .circle::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 350px;
height: 350px;
border-radius: 50%;
background-color: #191919;
border: 8px solid var(--clr);
filter: drop-shadow(0 0 10px var(--clr)) drop-shadow(0 0 60px var(--clr));
transition: .5s, background-color .5s;
transition-delay: .75s, 1ms;
}
.card:hover .circle::before {
width: 100%;
height: 100%;
border-radius: 20px;
background-color: var(--clr);
transition-delay: .5s;
}
.card .circle .logo {
position: relative;
width: 250px;
transition: .5s;
transition-delay: .5s;
}
.card:hover .circle .logo {
transform: scale(0);
transition-delay: 0;
}
.card .product_img {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%) scale(0) rotate(315deg);
height: 300px;
transition: .5s ease-in-out;
}
.card:hover .product_img {
transition-delay: .75s;
top: 25%;
left: 72%;
height: 500px;
transform: translate(-50%, -50%) scale(1) rotate(15deg);
}
.card .content {
position: absolute;
width: 50%;
left: 20%;
padding: 20px 20px 20px 40px;
opacity: 0;
transition: .5s;
visibility: hidden;
}
.card:hover .content {
transition-delay: .75s;
opacity: 1;
visibility: visible;
left: 20px;
}
.card .content h2 {
color: #FFF;
text-transform: uppercase;
font-size: 2.5em;
line-height: 1rem;
}
.card .content p {
color: #FFF;
margin: 20px 0;
}
.card .content a {
position: relative;
color: #111;
background-color: #FFF;
padding: 10px 20px;
border-radius: 10px;
display: inline-block;
text-decoration: none;
font-weight: 600;
}
728x90
LIST
'HTML _CSS' 카테고리의 다른 글
Bouncing Ball (0) | 2023.02.07 |
---|---|
Pulse effect on button hover (0) | 2023.02.06 |
Movie Streaming Website (0) | 2023.02.04 |
Animated Gender Selection Page Design (0) | 2023.02.02 |
Shine effect on hover (0) | 2023.02.01 |