Skip to content

Commit 6fb5a4c

Browse files
committed
Efeito rolagem com mouse Hover
1 parent b60b13a commit 6fb5a4c

File tree

4 files changed

+52
-0
lines changed

4 files changed

+52
-0
lines changed
479 KB
Loading
263 KB
Loading
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<!DOCTYPE html>
2+
<html lang="pt-br">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<link rel="stylesheet" href="style.css">
7+
<title>Efeito rolagem com Hover</title>
8+
</head>
9+
<body>
10+
11+
<div class="img-port site1" style="background-image: url(https://github.com/images/imagem2.jpg); transition: 10s;"></div><!--img-port-->
12+
13+
<div class="img-port site2" style="background-image: url(https://github.com/images/imagem.jpg); transition: 20s;"></div><!--img-port-->
14+
15+
</body>
16+
</html>
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
2+
*{
3+
margin: 0;
4+
padding: 0;
5+
box-sizing: border-box;
6+
}
7+
8+
body{
9+
height: 100vh;
10+
display: flex;
11+
align-items: center;
12+
justify-content: center;
13+
}
14+
15+
.img-port{
16+
width: 360px;
17+
height: 660px;
18+
background-size: cover;
19+
background-position: 100% 0%;
20+
border-radius: 20px;
21+
cursor: pointer;
22+
}
23+
24+
.img-port:hover{
25+
background-position: 100% 100%;
26+
}
27+
28+
.site1{
29+
background-image: url(images/imagem.jpg);
30+
transition: 100s;
31+
}
32+
33+
.site2{
34+
background-image: url(images/imagem2.jpg);
35+
transition: 10s;
36+
}

0 commit comments

Comments
 (0)