JSFiddle - React, Tailwind, and code Playground

by Clear

HTML

<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
<div class="header">
  <div class="name">
   Davide Scanu
  </div>
  <ul class="info" id="header">
   <li>13 Bredford Road W13 0SP London - UK</li>
   <li>+44 07935 721 591</li>
   <li>[email protected]</li>
  </ul>
 </div>
 <div class="content">
  <ul class="info" id="container">
    <li>13 Bredford Road W13 0SP London - UK</li>
    <li>+44 07935 721 591</li>
    <li>[email protected]</li>
  </ul>
 </div>

CSS

@import url(http://fonts.googleapis.com/css?family=Noto+Sans:300italic,400italic,700italic,400,300,700);

@media screen and (max-width: 940px) {
	
	.name {
		width: 100%;
		text-align: center;
		margin-left: 0 !important;
	}
	
	.info#header {
		display: none;
	}
	
	.info#container {
		display: block !important;
	}

}

@media screen and (max-width: 380px) {
	
	.name {
		margin-top: -72px !important;
	}

}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
}

.header {
	background: #1BB444;
	width: 100%;
	height: 300px;
	position: fixed;
	top: 0px;
	left: 0px;
	z-index: 90;
}

.name {
	font-family: 'Noto Sans', sans-serif;
	font-size: 60px;
	font-weight: lighter;
	color: #fff;
	position: absolute;
	top: 50%;
	margin-top: -41px;
	margin-left: 40px;
}

.name ~ span {
	font-family: 'Noto Sans', sans-serif;
	font-weight: bold;
	font-style: italic;
	font-size: 30px;
	color: #1BB444;
	margin-left: 40px;
}

.info {
	list-style: none;
	margin: 0;
}

.info#header {
	position: absolute;
	right: 20px;
	top: 50%;
	margin-top: -120px;
}

.info#container {
	display: none;
	padding: 0;
}

.info#header li {
	height: 40px;
	font-family: 'Noto Sans', sans-serif;
	font-size: 20px;
	color: #fff;
	margin: 30px 0 30px 0;
	line-height: 40px;
	position: relative;
}

.info#container li {
	width: 100%;
	border-bottom: 1px solid #c6c6c6;
	font-family: 'Noto Sans', sans-serif;
	font-size: 20px;
	color: #1BB444;
	padding: 20px;
	position: relative;
}


.info#header li:first-child:before {
	background: #fff;
	color: #1BB444;
	display: block;
	height: 40px;
	width: 40px;
	border-radius: 20px;
	position: absolute;
	left: -55px;
	font-family: 'FontAwesome';
	font-size: 30px;
	content: '\f041';
	text-align: center;
	line-height: 40px;
}

.info#container li:first-child:before {
	color: #1BB444;
	display: inline;
	margin: 0 19px 0 2px;
	font-family: 'FontAwesome';
	font-size: 30px;
	content: '\f041';
	text-align: center;
	line-height: 40px;
}

.info#header li:nth-child(2):before {
	background:...

JavaScript

$(function() {
	   
	   function parallax(){
           var scrolled = $(window).scrollTop();
		   $(".name").css("top",(-(scrolled*0.5)+(300/2))+"px");
       }
	   
	   $(window).scroll(function(e){
		   var scrolled = $(window).scrollTop();
		   if (scrolled >= 18) {
			   alert("ciao");
		   }
       });
	   
   });