Build in-demand skills in Northwestern’s online MS in Information Design

Difficulty:IntermediateLength:MediumLanguages: In this new tutorial, we’ll get rid of the usual boring rectangular boxes and learn to build a landing page full of complex SVG shapes. We’ll even enhance it with Bootstrap styles as well as a full-screen background video.  The best way to understand what we’re going to build is by checking out the demo, so it’s all yours: Shall we start? 1. Begin With the Necessary Assets To speed up the development process, I’ve included Bootstrap 4 in the pen.  If you check the markup, you’ll notice that I heavily use Bootstrap’s helper classes. Although not necessary, in case you aren’t familiar with Bootstrap, take a minute to look at its documentation or my other Bootstrap tutorials. 2. Continue With the Page Markup Our page will consist of an SVG and three sections: … … … … Note: In the demo, there’s also a simple footer layout which I won’t discuss in the tutorial. 3. Create the SVG Sprite For our layout, we’ll need a bunch of SVG shapes (waves, curves, whatever you’d like to call them). To create them, we won’t use an editing program like Adobe Illustrator or Sketch as you might expect; we’ll generate them by taking advantage of an awesome online tool made by z creative labs.  Pretty cool, right? No need to spend time manually creating them in a program (though obviously you can if you prefer). All we need is to experiment a bit with the options of this tool until we end up with the desired SVGs. After grabbing the generated code for each SVG, we’ll create a sprite by wrapping them within an SVG container. This is a technique that I’ve discussed many times in the past. The generated SVG shape code Note: Depending on the layout, we might have to manually change the SVG’s path color.  We’ll place each icon inside a symbol element with a unique ID and a viewbox attribute which will specify its dimensions. Also, we’ll let it scale without keeping an eye on its aspect ratio thanks to the preserveAspectRatio=”none” attribute value. Finally, we’ll render the target icon on the screen via the use element. Here’s the markup needed for the SVG sprite: 4. Define Some Basic Styles Beyond Bootstrap’s default styles, let’s define some additional ones. We’ll also override some of Bootstrap’s button styles to cover our needs: :root { –overlay: rgba(0, 0, 0, 0.35); –box-shadow: 0 5px 20px 2px rgba(0, 0, 0, 0.15); –green: #528119; } * { padding: 0; margin: 0; box-sizing: border-box; } a { color: inherit; } a:hover { color: currentColor; text-decoration: none; } .cover { background-repeat: no-repeat; background-position: center; background-size: cover; } .overlay { top: 0; left: 0; right: 0; bottom: 0; background: var(–overlay); } .btn-outline-success { color: var(–green); } .btn-outline-success:hover, .btn-outline-success:not(:disabled):not(.disabled):active { background: var(–green); } .btn-outline-success, .btn-outline-success:hover, .btn-outline-success:not(:disabled):not(.disabled):active { border-color: var(–green); } 5. Build the First Section The first section will include:  A full screen background video. An overlay with a blockquote which will sit on top of the video. An absolutely positioned SVG shape at the bottom of this section which will give it a diagonal look and feel. Here’s its appearance: Section #1 HTML … …  » Read More

Like to keep reading?

This article first appeared on webdesign.tutsplus.com. If you'd like to keep reading, follow the white rabbit.

View Full Article

Leave a Reply