Skip to content

Commit 78744b5

Browse files
Add files via upload
1 parent 7f0d4f8 commit 78744b5

File tree

2 files changed

+69
-0
lines changed

2 files changed

+69
-0
lines changed

Card Slide In Hover/index.html

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<link rel="stylesheet" type="text/css" href="style.css">
5+
</head>
6+
<body>
7+
8+
<div class="card">
9+
<div class="card-in">
10+
<div class="card-text">
11+
Codeblogger
12+
</div>
13+
<div class="card-background"></div>
14+
</div>
15+
</div>
16+
17+
</body>
18+
</html>

Card Slide In Hover/style.css

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
body {
2+
font-family: "DM Sans", sans-serif;
3+
background-color: #f2f5f7;
4+
}
5+
6+
.card{
7+
position: absolute;
8+
top: 50%;
9+
left: 50%;
10+
transform: translate(-50%,-50%);
11+
cursor: pointer;
12+
overflow: hidden;
13+
}
14+
15+
.card-in{
16+
width: 360px;
17+
height: 160px;
18+
border: 7.5px solid #262626;
19+
border-radius: 7.5px;
20+
}
21+
22+
.card-text{
23+
text-align: center;
24+
line-height: 160px;
25+
font-size: 40px;
26+
color: #262626;
27+
font-weight: bold;
28+
text-transform: uppercase;
29+
transition: 1s;
30+
}
31+
32+
.card-background{
33+
display: block;
34+
width: 362px;
35+
height: 162px;
36+
background: red;
37+
background-color: #262626;
38+
z-index: -1;
39+
transition: 1s;
40+
}
41+
42+
.card:hover .card-background{
43+
margin-top: -161px;
44+
transition: 1s;
45+
}
46+
47+
.card:hover .card-text{
48+
transition: 1s;
49+
color: #f2f5f7;
50+
text-shadow: 0px 0px 30px rgba(255,255,255,0.86);
51+
}

0 commit comments

Comments
 (0)