Difference between revisions of "Team:Glasgow/test"

Line 9: Line 9:
 
       display:none;
 
       display:none;
 
}
 
}
html, body {
+
body {
 +
  overflow-x: hidden;
 
   width: 100%;
 
   width: 100%;
   margin: 0px;
+
  background: #D2D2D2;
 +
   margin: 0;
 +
  padding: 0;
 +
  font-family: "Arial";
 +
  font-size: 32px;
 
}
 
}
  
html {
+
span.center {
   background: #eeecec;
+
   margin: 0 35%;
   overflow-x: hidden;
+
   width: 30%;
 
}
 
}
  
#container {
+
div.bar {
  z-index: 111;
+
   top: 0px;
}
+
 
+
.navT {
+
  -webkit-transition: all 0.25s;
+
  z-index: 111;
+
  cursor: pointer;
+
  width: 100%;
+
  background: #212121;
+
  height: 65px;
+
  left: 0;
+
   top: 0;
+
  position: fixed;
+
}
+
.navT .icon {
+
  -webkit-transition: all 0.25s;
+
 
   position: absolute;
 
   position: absolute;
   width: 30px;
+
   padding: 15px 0;
  height: 1px;
+
   color: #FFFFFF;
  left: 15px;
+
  top: 30px;
+
  background-color: white;
+
}
+
.navT .icon:before, .navT .icon:after {
+
  -webkit-transition: all 0.25s;
+
   width: 30px;
+
  height: 1px;
+
  left: 0;
+
  background: white;
+
  position: absolute;
+
  content: '';
+
}
+
.navT .icon:before {
+
  top: -10px;
+
}
+
.navT .icon:after {
+
  top: 10px;
+
}
+
.navT:hover {
+
  background: black;
+
}
+
.navT:hover .icon:before {
+
  top: -12px;
+
}
+
.navT:hover .icon:after {
+
  top: 12px;
+
}
+
.navT.active .icon {
+
  -webkit-transform: rotate(180deg);
+
  background-color: transparent;
+
  left: 10px;
+
}
+
.navT.active .icon:before, .navT.active .icon:after {
+
  top: 0;
+
}
+
.navT.active .icon:before {
+
  -webkit-transform: rotate(45deg);
+
}
+
.navT.active .icon:after {
+
  -webkit-transform: rotate(-45deg);
+
}
+
 
+
#menu {
+
  z-index: 111;
+
  -webkit-transition: all 0.5s;
+
  text-align: center;
+
  position: fixed;
+
  left: 0;
+
  right: 0;
+
  margin: 0 auto;
+
  top: 65px;
+
  font-size: 18px;
+
  font-family: sans-serif;
+
  font-weight: 100;
+
  text-transform: uppercase;
+
 
   width: 100%;
 
   width: 100%;
   height: 0;
+
   background: #33B5E5;
   border-bottom: 1px solid transparent;
+
   border: 1px solid #0099CC;
  overflow: hidden;
+
   border-radius: 2px 2px 2px 2px;
}
+
#menu ul {
+
  list-style: none;
+
  padding: 0;
+
  letter-spacing: 0.4em;
+
}
+
#menu li:first-child {
+
  margin-top: 0;
+
}
+
#menu li {
+
  -webkit-transition: all 0.2s;
+
  margin-top: 20px;
+
  padding: 5px 0;
+
  color: white;
+
}
+
#menu a {
+
  padding: 8px;
+
  -webkit-transition: all 0.25s;
+
  cursor: pointer;
+
}
+
#menu a:hover {
+
  letter-spacing: 0.5em;
+
  text-decoration: underline;
+
}
+
#menu.open {
+
  height: 270px;
+
  width: 100%;
+
  background: #f3581b;
+
   border-bottom: 1px solid black;
+
 
}
 
}
  
.space {
+
div.close {
   letter-spacing: 0;
+
   z-index: 999;
}
+
   height: 210px;
 
+
   top: -242px;
.content {
+
    
   width: 100%;
+
   font-size: 20px;
+
  font-family: sans-serif;
+
   font-weight: 100;
+
  -webkit-transition: top 0.5s;
+
 
   position: absolute;
 
   position: absolute;
   top: 65px;
+
   padding: 15px 0;
  margin: 0 auto;
+
   color: #33B5E5;
}
+
.content h1 {
+
   font-size: 3em;
+
  text-transform: uppercase;
+
  margin-top: 85px;
+
  margin-left: 10px;
+
}
+
.content h2 {
+
  font-size: 1em;
+
  text-transform: uppercase;
+
  margin-top: -25px;
+
  margin-left: 10px;
+
  font-weight: 400;
+
  letter-spacing: 0.7em;
+
}
+
.content.shift {
+
  top: 335px;
+
}
+
 
+
p {
+
  max-width: 600px;
+
  font-size: 0.75em;
+
  line-height: 1.75em;
+
  text-align: left;
+
  margin-left: 10px;
+
}
+
 
+
#second {
+
  left: 0;
+
 
   width: 100%;
 
   width: 100%;
   background: #999;
+
   background: #FFFFFF;
   height: 600px;
+
   border: 1px solid rgba(0, 0, 0, 0.2);
   margin-top: 200px;
+
   border-radius: 2px 2px 2px 2px;
   text-align: center;
+
   box-shadow: 0 2px 10px rgba(0,0,0,.2);
}
+
 
#second h1, #second h2 {
+
   transition: top 0.2s ease-out;
   margin-right: 20px;
+
   -moz-transition: top 0.2s ease-out;  
}
+
   -o-transition: top 0.2s ease-out;    
#second h1 {
+
   -webkit-transition: top 0.2s ease-out;
   padding-top: 40px;
+
}
+
#second p {
+
   text-align: center;
+
  margin: 0 auto;
+
   margin-bottom: 20px;
+
 
}
 
}
  
#third {
+
div.open {
   background: black;
+
   z-index: 999;
 +
  height: 210px;
 +
  top: 0px;
 +
 
 +
  position: absolute;
 +
  padding: 15px 0;
 +
  color: #33B5E5;
 
   width: 100%;
 
   width: 100%;
   height: 300px;
+
   background: #FFFFFF;
   padding-top: 50px;
+
   border: 1px solid rgba(0, 0, 0, 0.2);
}
+
   border-radius: 2px 2px 2px 2px;
#third h2 {
+
   box-shadow: 0 2px 10px rgba(0,0,0,.2);
   color: white;
+
    
  text-align: center;
+
   transition: top 0.2s ease-out;
   margin-top: 50px;
+
   -moz-transition: top 0.2s ease-out;  
}
+
   -o-transition: top 0.2s ease-out;    
#third h5 {
+
   -webkit-transition: top 0.2s ease-out;
   color: white;
+
   font-family: sans-serif;
+
   text-transform: uppercase;
+
  font-weight: 200;
+
   letter-spacing: 0.25em;
+
   text-align: center;
+
}
+
 
+
#bar {
+
  width: 40%;
+
  height: 200px;
+
  margin: 0 auto;
+
  border: 1px dashed white;
+
 
}
 
}
 
</style>
 
</style>
 
<script type="text/javascript">
 
<script type="text/javascript">
$(".navT").on("click", function(){
+
document.getElementById('header').addEventListener('click', function(e) {
   $(this).toggleClass("active");
+
   document.getElementById('menu').className = 'open';
  $("#menu").toggleClass("open");
+
});
   $(".content").toggleClass("shift");
+
 
 +
document.getElementById('menu').addEventListener('click', function(e) {
 +
   document.getElementById('menu').className = 'close';
 
});
 
});
 
</script>
 
</script>
  
  
<div id="container">
+
<body>
  <div class="navT">
+
 
     <div class="icon"></div>
+
  <div id="menu" class="close">
 +
     <span class="center">Boo! :)</span>
 
   </div>
 
   </div>
 
    
 
    
   <div id="menu">
+
   <div id="header" class="bar">
    <ul>
+
    <span class="center">Click Me</span>
      <li><a>Hom<span class="space">e</span></a></li>
+
      <li><a>Abou<span class="space">t</span></a></li>
+
      <li><a>Wor<span class="space">k</span></a></li>
+
      <li><a>Blo<span class="space">g</span></a></li>
+
      <li><a>Contac<span class="space">t</span></a></li>
+
    </ul>
+
  </div>
+
 
+
</div>
+
<div class='content'>
+
  <div id="first">
+
  <h1> Sample Content </h1>
+
  <h2>A quick example of a nav menu</h2>
+
  <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p></div>
+
  <div id="second">
+
    <h1>The Top Menu</h1>
+
    <h2>Pushes page content down</h2>
+
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
+
    <div id="bar"></div>
+
  </div>
+
  <div id="third">
+
    <h2>But also allows for scrollling</h2>
+
    <h5>While the menu is down</h5>
+
 
   </div>
 
   </div>
 
    
 
    
</div>
 
 
 
 
</body>
 
</body>
 
</html>
 
</html>

Revision as of 16:18, 23 August 2015