Difference between revisions of "Team:Manchester/Attributions"

Line 2: Line 2:
 
{{ManchesterMobile}}
 
{{ManchesterMobile}}
 
<html>
 
<html>
 +
 
<head>
 
<head>
 
<style>
 
<style>
 
body, html {
 
body, html {
    height: 100%;
+
  height: 100%;
 +
  margin: 0;
 +
  font: 400 15px/1.8 "Lato", sans-serif;
 +
  color: #777;
 
}
 
}
  
.parallax {
+
.bgimg-1, .bgimg-2, .bgimg-3 {
    /* The image used */
+
  position: relative;
    background-image: url("https://cdn.pixabay.com/photo/2013/12/17/20/10/air-bubbles-230014_960_720.jpg");
+
  opacity: 0.65;
 +
  background-attachment: fixed;
 +
  background-position: center;
 +
  background-repeat: no-repeat;
 +
  background-size: cover;
  
    /* Full height */
+
}
    height: 100%;  
+
.bgimg-1 {
 +
  background-image: url("img_parallax.jpg");
 +
  min-height: 100%;
 +
}
  
    /* Create the parallax scrolling effect */
+
.bgimg-2 {
    background-attachment: fixed;
+
  background-image: url("img_parallax2.jpg");
    background-position: center;
+
  min-height: 400px;
    background-repeat: no-repeat;
+
    background-size: cover;
+
 
}
 
}
  
/* Turn off parallax scrolling for tablets and phones. Increase the pixels if needed */
+
.bgimg-3 {
 +
  background-image: url("img_parallax3.jpg");
 +
  min-height: 400px;
 +
}
 +
 
 +
.caption {
 +
  position: absolute;
 +
  left: 0;
 +
  top: 50%;
 +
  width: 100%;
 +
  text-align: center;
 +
  color: #000;
 +
}
 +
 
 +
.caption span.border {
 +
  background-color: #111;
 +
  color: #fff;
 +
  padding: 18px;
 +
  font-size: 25px;
 +
  letter-spacing: 10px;
 +
}
 +
 
 +
h3 {
 +
  letter-spacing: 5px;
 +
  text-transform: uppercase;
 +
  font: 20px "Lato", sans-serif;
 +
  color: #111;
 +
}
 +
 
 +
/* Turn off parallax scrolling for tablets and phones */
 
@media only screen and (max-device-width: 1024px) {
 
@media only screen and (max-device-width: 1024px) {
     .parallax {
+
     .bgimg-1, .bgimg-2, .bgimg-3 {
 
         background-attachment: scroll;
 
         background-attachment: scroll;
 
     }
 
     }
Line 31: Line 69:
 
</head>
 
</head>
 
<body>
 
<body>
<p>In this example we have turned off parallax scrolling for mobile devices. It works as expected on all desktop screens sizes.</p>
 
<p>Scroll Up and Down this page to see the parallax scrolling effect.</p>
 
  
<div class="parallax"></div>
+
<div class="bgimg-1">
 +
  <div class="caption">
 +
    <span class="border">SCROLL DOWN</span>
 +
  </div>
 +
</div>
  
<div style="height:1000px;font-size:36px">
+
<div style="color: #777;background-color:white;text-align:center;padding:50px 80px;text-align: justify;">
This div is just here to enable scrolling.
+
  <h3 style="text-align:center;">Parallax Demo</h3>
Tip: Try to remove the background-attachment property to remove the scrolling effect.
+
  <p>Parallax scrolling is a web site trend where the background content is moved at a different speed than the foreground content while scrolling. Nascetur per nec posuere turpis, lectus nec libero turpis nunc at, sed posuere mollis ullamcorper libero ante lectus, blandit pellentesque a, magna turpis est sapien duis blandit dignissim. Viverra interdum mi magna mi, morbi sociis. Condimentum dui ipsum consequat morbi, curabitur aliquam pede, nullam vitae eu placerat eget et vehicula. Varius quisque non molestie dolor, nunc nisl dapibus vestibulum at, sodales tincidunt mauris ullamcorper, dapibus pulvinar, in in neque risus odio. Accumsan fringilla vulputate at quibusdam sociis eleifend, aenean maecenas vulputate, non id vehicula lorem mattis, ratione interdum sociis ornare. Suscipit proin magna cras vel, non sit platea sit, maecenas ante augue etiam maecenas, porta porttitor placerat leo.</p>
 
</div>
 
</div>
  
<div class="parallax"></div>
+
<div class="bgimg-2">
 +
  <div class="caption">
 +
    <span class="border" style="background-color:transparent;font-size:25px;color: #f7f7f7;">LESS HEIGHT</span>
 +
  </div>
 +
</div>
  
</body>
+
<div style="position:relative;">
 +
  <div style="color:#ddd;background-color:#282E34;text-align:center;padding:50px 80px;text-align: justify;">
 +
    <p>Scroll up and down to really get the feeling of how Parallax Scrolling works.</p>
 +
  </div>
 +
</div>
  
 +
<div class="bgimg-3">
 +
  <div class="caption">
 +
    <span class="border" style="background-color:transparent;font-size:25px;color: #f7f7f7;">SCROLL UP</span>
 +
  </div>
 +
</div>
 +
 +
<div style="position:relative;">
 +
  <div style="color:#ddd;background-color:#282E34;text-align:center;padding:50px 80px;text-align: justify;">
 +
    <p>Scroll up and down to really get the feeling of how Parallax Scrolling works.</p>
 +
  </div>
 +
</div>
 +
 +
<div class="bgimg-1">
 +
  <div class="caption">
 +
    <span class="border">COOL!</span>
 +
  </div>
 +
</div>
 +
 +
</body>
 
</html>
 
</html>

Revision as of 12:33, 31 July 2017

SCROLL DOWN

Parallax Demo

Parallax scrolling is a web site trend where the background content is moved at a different speed than the foreground content while scrolling. Nascetur per nec posuere turpis, lectus nec libero turpis nunc at, sed posuere mollis ullamcorper libero ante lectus, blandit pellentesque a, magna turpis est sapien duis blandit dignissim. Viverra interdum mi magna mi, morbi sociis. Condimentum dui ipsum consequat morbi, curabitur aliquam pede, nullam vitae eu placerat eget et vehicula. Varius quisque non molestie dolor, nunc nisl dapibus vestibulum at, sodales tincidunt mauris ullamcorper, dapibus pulvinar, in in neque risus odio. Accumsan fringilla vulputate at quibusdam sociis eleifend, aenean maecenas vulputate, non id vehicula lorem mattis, ratione interdum sociis ornare. Suscipit proin magna cras vel, non sit platea sit, maecenas ante augue etiam maecenas, porta porttitor placerat leo.

LESS HEIGHT

Scroll up and down to really get the feeling of how Parallax Scrolling works.

SCROLL UP

Scroll up and down to really get the feeling of how Parallax Scrolling works.

COOL!