Sticky test

Developer
Size
1,827 Kb
Views
24,288

How do I make an sticky test?

What is a sticky test? How do you make a sticky test? This script and codes were developed by Eddy on 27 August 2022, Saturday.

Sticky test Previews

Sticky test - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Sticky test</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="main" style="position:relative;"> <div class="top-part"> </div> <div class="sticky"> </div> <div class="content"> C'est le contenu </div>
</div> <script src='https://www.helloasso.com/js/libs/stickyfill.min.js'></script> <script src="js/index.js"></script>
</body>
</html>

Sticky test - Script Codes CSS Codes

.main{ width: 960px; height: 300px; overflow: auto; overflow-x: hidden; margin: 0 auto;
}
.top-part { width: 100%; height: 250px; background-color: #088A68;
}
.sticky { width: 100%; height: 50px; background-color: #000; position: -webkit-sticky; position: sticky; top: 0;
}
.content { height: 600px; border: 1px solid #000;
}

Sticky test - Script Codes JS Codes

var stickyElements = document.getElementsByClassName('sticky');
for (var i = stickyElements.length - 1; i >= 0; i--) { Stickyfill.add(stickyElements[i]);
}
Sticky test - Script Codes
Sticky test - Script Codes
Home Page Home
Developer Eddy
Username emnbdx
Uploaded August 27, 2022
Rating 3
Size 1,827 Kb
Views 24,288
Do you need developer help for Sticky test?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Eddy (emnbdx) Script Codes
Create amazing web content with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!