Emersing the user into the story: “This site is all about telling the YMCA’s story. One of their strengths is strong, emotional photography. We dug into their library to present fullscreen images that give the site immediate impact. The visuals were an opportunity to help set the mood and really draw the user in to each section of the story.” - Dan Bartley, Senior Designer
• Inspiration: www.imagineourymca.ca
One of the greatest weapons in the arsenal of a web designer is the image, and we’ve come a long way since the days of placing the smallest possible picture on a screen. Now designers are using the image to lead the user experience and coupled with the rich typography that CSS3 offers, we are witnessing the boundaries of HTML5 web sites pushed to greater success. This is evident in the Imagine our YMCA site created by Domain7. This skillfully crafted site uses jQuery to fade between background images as the site scrolls and the content on-screen changes. This produces a well-designed site that really adds to the user experience of the site.
Emersing the user into the story: “This site is all about telling the YMCA’s story. One of their strengths is strong, emotional photography. We dug into their library to present fullscreen images that give the site immediate impact. The visuals were an opportunity to help set the mood and really draw the user into each section of the story.”
#1 - INSPIRATION: An Enhanced Annual Report
Imagine our YMCA is actually the annual report, and it cost the same as designing, printing, and distributing a traditional annual report but has a far greater reach and shareability. Using a narrative-based approach, the team at Domain7 adapted the traditional paper-and-coil annual report format for desktop and mobile web viewing. This allowed the design to focus on key messaging within the site, a one-page display, photo evidence including galleries and moving image, mobile design, and a paperless approach.
#2 - TECHNIQUE: Transitioning With Scroll
STEP 1: Create A New Page
In Dreamweaver create a new HTML5 webpage and add the code to the head section. This links us to jQuery and creates the body style and the style for fixing the image container on the page.
CODE:
<script src="http://code.jquery.com/jquery-1.7.2.min.js"></script><style type="text/css">body{margin: 0; height: 1800px;min-height: 1800px; padding: 0;}imageSwap{position: fixed; overflow:hidden;top: 0px; left: 0px; width:100%;}#imageSwap.fixed {position: fixed;top:0 px;}
STEP 2: Style The Content
Here we position the images and fix the content in a div over the top of them in a semi-transparent box. This content is positioned on the page so that we have to scroll down to see the next section.
CODE:
.one {position:absolute; z-index:1;}.two {position:absolute; display:none;z-index:2;}.content {background-color:rgba(125,0,0,0.6);padding: 10px; height: 850px; width:800px;margin-right: auto; margin-left:auto;position: relative; z-index:100;}#first{top:50px;}#second{top:350px;}</style>
STEP 3: Add The HTML
In the body section of the document add the following code. Here we add the div container imageSwap which holds the images we will use in the background. We then have two content areas that are positioned above this. Finally, we move into JavaScript and set up two variables to hold the page position.
CODE:
<div id="imageSwap"><img class="one" src="image01.jpg" /><img class="two" src="image02.jpg" /></div><div id="first" class="content">Content Area 1</div><div id="second" class="content">Content Area 2</div><script language="javascript" type="text/javascript">var thisPos=1;var lastPos=1;
STEP 4: Using jQuery
The document ready function fixes the background div and detects scrolling. If the user scrolls past 900 pixels then they are at the second div container, so we fade in the second image while fading out the first image.
CODE:
$(document).ready(function () {$('#imageSwap').addClass('fixed');$(window).scroll(function() {var yPos = $(window).scrollTop();if (yPos > 900){thisPos=2;if(thisPos != lastPos){$('.one').fadeOut(500);$('.two').fadeIn(500);}}
STEP 5: Detecting First Content
Now the final code reverses the last bit. Save this document now and, assuming you have two images named image01.jpg and image02.jpg, you should have a page that changes the background depending on scrolling.
CODE:
if (yPos <= 900){thisPos=1if(thisPos != lastPos){$('.two').fadeOut(500);$('.one').fadeIn(500);}}lastPos=thisPos;});});</script>item"></a>
#3 - TECHNIQUE: Create The Content Background
The content background has an image with a rip down each side. This image is a semi-transparent PNG and is straightforward to create. We’re going to show the creation process using Photoshop to put the composition together.
STEP 1: Create The Gradient
Create a new document 800 pixels wide by 100 high in Photoshop with a transparent background. Choose light red and dark red as the foreground and background colours. Use the gradient tool to create a gradient across the screen.
STEP 2: Fade Image
Make the Opacity of the layer 50%, and then we need to search online for a rip or tear image. When you find one that’s black and white or transparent already, download it and open in Photoshop.
STEP 3: Add The Rip
Select the rip using a colour selection and drag it into the gradient document. Position it at the edge and with the rip selected, choose the gradient layer and hit delete. If you turn off the rip layer you will have a ripped edge. Repeat this for the opposite side.
Scrolling Image Effects
Reviewed by Kamal Thakur
on
Saturday, September 19, 2020
Rating:
No comments: