-
- /
-
Intégration html
- /
-
Créer un effet de défilement vers le bas de la souris animé
Créer un effet de défilement vers le bas de la souris animé
<!DOCTYPE html>
<html>
<head>
<title>Scroll to div ID | par NGLESSON</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="keyword" content="Scroll to div ID">
<meta name="author" content="Mezgani said">
<meta name="copyright" content="NGLESSON">
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link href="style.css" rel="stylesheet">
</head>
<body>
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<div class="moving-mouse-holder">
<div class="mouse">
<div class="mouse-button"> </div>
</div>
<div class="text">SCROLL DOWN <br> TO EXPLORE MORE</div>
</div>
</div>
</body>
</html>
body{background: #000;}
.moving-mouse-holder {
margin: auto;
margin-top: 60px;
width: 170px;
}
.moving-mouse-holder .mouse {
width: 26px;
height: 40px;
position: relative;
right: 0;
border-radius: 18px;
border: 2px solid #FFF;
}
.moving-mouse-holder .mouse-button {
background-color: #FFF;
width: 4px;
height: 10px;
border-radius: 2px;
position: absolute;
top: 10px;
left: 50%;
margin: 0 0 0 -2px;
animation: mouse-scroll 1s infinite alternate;
}
.moving-mouse-holder .text {
margin-top: -30px;
margin-left: 40px;
color: #FFF;
font-size: 12px;
line-height: 1em;
}
@keyframes mouse-scroll {
to {
transform: translate(0, 6px) scale(1, 0.8);
}
}