Parallax Scrolling Effect
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="STYLESHEET" type="text/css" href="web.css">
<title>web design</title>
</head>
<body>
<p>Scroll and Down this page to see the parallax Scroll Effect.</p>
<div class="parallax"></div>
<div style="height: 1000px; background-color: red;font-size: 36px;">Scroll Up and Down this page to see the parallax scrolling effect. This div is just here to enable scrolling. Tip: Try to remove the background-attachment property to remove the scrolling effect.</div>
</body>
</html>
CSS Parallax Scrolling Style
.parallax{
background-image: url(shit.jpg);
min-height:500px;
background-attachment: fixed;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
}
No comments:
Post a Comment