Simple one page header concept

Developer
Size
2,530 Kb
Views
52,624

How do I make an simple one page header concept?

What is a simple one page header concept? How do you make a simple one page header concept? This script and codes were developed by Chrysto on 16 July 2022, Saturday.

Simple one page header concept Previews

Simple one page header concept - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Simple one page header concept</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="header">	<p class="slogan">Section</p>	<div class="word">	<ul>	<li>One</li>	<li>Two</li>	<li>Three</li>	<li>Four</li>	<li>Five</li>	<li>Six</li>	</ul>	</div>	</div>	<div class="content">	<div class="box box1">One</div>	<div class="box box2">Two</div>	<div class="box box3">Three</div>	<div class="box box4">Four</div>	<div class="box box5">Five</div>	<div class="box box6">Six</div>	</div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
<script src='http://cdnjs.cloudflare.com/ajax/libs/gsap/latest/TweenMax.min.js'></script> <script src="js/index.js"></script>
</body>
</html>

Simple one page header concept - Script Codes CSS Codes

body, div, p{	margin: 0;	padding: 0;	font-family: Helvetica;	}	.header{	position: fixed;	z-index: 1000;	width: 100%;	height: 100px;	background-color: black;	color: white;	}	.header p{	display: inline-block;	padding-left: 40px;	font-size: 24px;	line-height: 30px;	padding-top: 30px;	}	.word{	position: absolute;	top: 30px;	display: inline-block;	width: 400px;	height: 30px;	overflow: hidden;	}	ul{	list-style: none;	position: absolute;	}	ul li{	font-size: 24px;	}	.content .box{	width: 100%;	height: 700px;	}	.box1{	background-color: #88b6f7;	}	.box2{	background-color: #9a9bff;	}	.box3{	background-color: #bbfb94;	}	.box4{	background-color: #ed74c4;	}	.box5{	background-color: #eb984e;	}	.box6{	background-color: #a9eaf1;	}

Simple one page header concept - Script Codes JS Codes

var $window = $(window)	var $box = $(".box");	var $menus = $(".header ul");	var currentIndex = 0;	var lastIndex = -1;	var positions = []	//	$menus.find("li").each(function(index){	$(this).css({	position: "absolute",	top: index*74,	color: $box.eq(index).css("background-color")	});	setHeader();	});	//	$window.scroll(function() { var scrollTop = $window.scrollTop(); $.each(positions, function(index, value){ if(value > scrollTop ){	if(currentIndex != index){	lastIndex = currentIndex;	currentIndex = index;	setHeader();	}	return false; } });	});	function setHeader(){	TweenLite.to( $menus, 0.5, {top: -74*currentIndex - 14 });	if(currentIndex > lastIndex){ //some animation from top to bottom	//console.log("otgore nadolu");	} else { //some animation from bottom to top	//console.log("otdolu nagore");	}	}	$window.resize(function(){	positions.length = 0;	$box.each(function(){	var $elem = $(this);	return positions.push( parseInt($elem.offset().top + $elem.height() - 100));	});	}).resize();
Simple one page header concept - Script Codes
Simple one page header concept - Script Codes
Home Page Home
Developer Chrysto
Username bassta
Uploaded July 16, 2022
Rating 4
Size 2,530 Kb
Views 52,624
Do you need developer help for Simple one page header concept?

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!

Chrysto (bassta) Script Codes
Create amazing SEO 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!