Backgrounds and the vw unit

Developer
Size
1,823 Kb
Views
22,264

How do I make an backgrounds and the vw unit?

This is an example from the blog article Cool stuff with CSS3 vw and vh units at http://www.tipue.com/blog/css3-vw-vh/. What is a backgrounds and the vw unit? How do you make a backgrounds and the vw unit? This script and codes were developed by Steve Pear on 16 September 2022, Friday.

Backgrounds and the vw unit Previews

Backgrounds and the vw unit - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Backgrounds and the vw unit </title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div id="container"><div class="viewport-1"><div class="inner-div"><h1>Viewport background 1</h1></div></div><div class="viewport-2"><div class="inner-div"><h1>Viewport background 2</h1></div></div></div>
</body>
</html>

Backgrounds and the vw unit - Script Codes CSS Codes

h1
{ font: 18px/1.6 "Open Sans", sans-serif; color: #333;	text-transform: uppercase;	letter-spacing: 2px; padding: 10px 0; background-color: #fff; text-align: center; border-radius: 2px;
}
#container
{ width: 200vw;
}
.viewport-1
{ float: left; background-size: cover; background-image: url('http://www.tipue.com/img/jetty.jpg'); width: 100vw; height: 100vh;
}
.viewport-2
{ float: left; background-size: cover; background-image: url('http://www.tipue.com/img/dive.jpg'); width: 100vw; height: 100vh;
}
.inner-div
{ padding-top: 70px; margin: 0 auto; width: 370px;
}
Backgrounds and the vw unit - Script Codes
Backgrounds and the vw unit - Script Codes
Home Page Home
Developer Steve Pear
Username Tipue
Uploaded September 16, 2022
Rating 3
Size 1,823 Kb
Views 22,264
Do you need developer help for Backgrounds and the vw unit?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Steve Pear (Tipue) Script Codes
Create amazing love letters with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!