Coder Wrap provides free to use snippets Coder Wrap provides free to use snippets

Back to CSS3
Preview Source Code
Download
HTML
CSS
/**Typeo CSS Start**/
@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

* {
	box-sizing: border-box;
}

body {
	font-family: "Poppins", sans-serif;
	color: #444;
	box-sizing: border-box;
	margin: 0px;
}

ul, li, a {
	list-style: none;
	text-decoration: none;
	margin: 0px;
	padding: 0px;
}

.container {
	max-width: 1280px;
	width: 100%;
	padding: 0px 15px;
	margin: auto;
}

.container-fluid {
	width: 100%;
	padding: 0px 30px;
}

/**Typeo CSS End**/

/* --- for all three examples ----*/

.nav {
text-align: center;
overflow: hidden;
margin: 2em auto;
width: 480px;
position: relative;
}
.nav a {
display: inline-block;
position: relative;
float: left;
padding: 1em 0 2em;
width: 25%;
text-decoration: none;
color: #393939;
-webkit-transition: .7s;
-moz-transition: .7s;
-o-transition: .7s;
-ms-transition: .7s;
transition: .7s;
font-size: 20px;
}
.nav a:hover {
color: #c6342e;
}
.effect {
position: absolute;
left: -12.5%;
-webkit-transition: 0.7s ease-in-out;
-moz-transition: 0.7s ease-in-out;
-o-transition: 0.7s ease-in-out;
-ms-transition: 0.7s ease-in-out;
transition: 0.7s ease-in-out;
}
.nav a:nth-child(1):hover ~ .effect {
left: 12.5%;
}
.nav a:nth-child(2):hover ~ .effect {
left: 37.5%;
}
.nav a:nth-child(3):hover ~ .effect {
left: 62.5%;
}
.nav a:nth-child(4):hover ~ .effect {
left: 87.5%;
}
/* ----- line example -----*/

.ph-line-nav .effect {
width: 90px;
height: 2px;
bottom: 36px;
background: #c6342e;
margin-bottom: -2px;
box-shadow: 0 1px 0 white;
margin-left: -45px;
}
/* ----- dot example -----*/

.ph-dot-nav:after {
content: "";
display: block;
position: absolute;
width: 100%;
height: 1px;
background: #c6342e;
bottom: 34px;
}
.ph-dot-nav a:after {
content: "";
position: absolute;
width: 4px;
height: 4px;
bottom: 32px;
left: 50%;
margin-left: -2px;
background: #c6342e;
border-radius: 100%;
}
.ph-dot-nav .effect {
width: 10px;
height: 10px;
bottom: 30px;
margin-left: -5px;
background: #c6342e;
border-radius: 100%;
}

Related Snippets

Leave a comment

Your email address will not be published. Required fields are marked *