Backgrounds and the vw unit
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 - 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;
}
Developer | Steve Pear |
Username | Tipue |
Uploaded | September 16, 2022 |
Rating | 3 |
Size | 1,823 Kb |
Views | 22,264 |
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!
Name | Size |
Fixing a div to the bottom of a page | 2,671 Kb |
Flexbox, big third, third gone | 1,777 Kb |
Backgrounds and the vh unit | 1,761 Kb |
Flexbox, div centered | 1,628 Kb |
Centering a div in a page, basic | 1,500 Kb |
Centering two responsive divs, side by side | 1,888 Kb |
Fixing a div, basic | 2,004 Kb |
Fixing a div to the horizontal center of a page | 1,984 Kb |
Flexbox, big third | 1,748 Kb |
Flexbox, flexible footer | 1,692 Kb |
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!
Name | Username | Size |
Pure CSS Dial | Lukewatts | 3,018 Kb |
Weird glowy CSS3 game | Toneworm | 3,684 Kb |
Fireworks Show | Arianalynn | 3,048 Kb |
CSS3 Selectables with information rollover | Jasonmayes | 9,565 Kb |
Scifi-style Radio-based Tab | Aaronchuo | 4,427 Kb |
Custom Checkbox and radio inputs SCSS | Rgfx | 3,367 Kb |
Minimal Menu | Achudars | 3,430 Kb |
Swiftype Lower Third | Zumwalt | 4,796 Kb |
3d css cube | Semenchenko | 4,578 Kb |
Basic HTML5 Structure | YuvarajTana | 1,289 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!