Basic Fullscreen Hero
How do I make an basic fullscreen hero?
Full screen background image with centered text. What is a basic fullscreen hero? How do you make a basic fullscreen hero? This script and codes were developed by David Klotz on 23 January 2023, Monday.
Basic Fullscreen Hero - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Basic Fullscreen Hero</title> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scaleable=no"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <link rel='stylesheet prefetch' href='https://fonts.googleapis.com/css?family=Open+Sans:400,300,400italic,300italic,600,600italic,700,700italic,800,800italic'> <style> /* NOTE: The styles were added inline because Prefixfree needs access to your styles and they must be inlined if they are on local disk! */ @import url("https://fonts.googleapis.com/css?family=Roboto:300,400,700");
.p-hero { height: 100vh; width: 100vw; position: relative; display: table; overflow: hidden; color: #ffffff;
}
.p-hero .p-hero__overlay { background: rgba(0, 0, 0, 0.3); width: 100%; height: 100vh; position: absolute;
}
.p-hero .p-hero__image { background: url(https://photos.smugmug.com/Public/i-B2zphBP/4/5c5d42e6/O/1440x900.jpg) no-repeat; background-size: cover; background-position: center center;
}
.p-hero .p-hero__content { position: relative; height: 100vh; width: 100%; font-family: "Roboto", sans-serif; /* vertically align its content */ display: table; overflow: hidden;
}
.p-hero .p-hero__content .p-hero__headline { display: table-cell; text-align: center; vertical-align: middle;
} </style> <script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
</head>
<body> <div class="p-hero"> <div class="p-hero__image"> <div class="p-hero__overlay"></div> <div class="p-hero__content"> <div class="p-hero__headline"> <h1>Fullscreen Hero Image</h1> <p>Fullscreen background image with centered text.</p> </div> </div> </div>
</div> <script src='https://code.jquery.com/jquery-2.2.4.min.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/modernizr/2.8.3/modernizr.min.js'></script>
</body>
</html>
Basic Fullscreen Hero - Script Codes CSS Codes
@import url("https://fonts.googleapis.com/css?family=Roboto:300,400,700");
.p-hero { height: 100vh; width: 100vw; position: relative; display: table; overflow: hidden; color: #ffffff;
}
.p-hero .p-hero__overlay { background: rgba(0, 0, 0, 0.3); width: 100%; height: 100vh; position: absolute;
}
.p-hero .p-hero__image { background: url(https://photos.smugmug.com/Public/i-B2zphBP/4/5c5d42e6/O/1440x900.jpg) no-repeat; background-size: cover; background-position: center center;
}
.p-hero .p-hero__content { position: relative; height: 100vh; width: 100%; font-family: "Roboto", sans-serif; /* vertically align its content */ display: table; overflow: hidden;
}
.p-hero .p-hero__content .p-hero__headline { display: table-cell; text-align: center; vertical-align: middle;
}
Developer | David Klotz |
Username | dkdesign |
Uploaded | January 23, 2023 |
Rating | 3 |
Size | 3,040 Kb |
Views | 6,072 |
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 |
Tout box hover content overlay | 4,242 Kb |
CSS Transitions Transforms Reveal v1.0 | 4,083 Kb |
Flexbox Layout | 3,647 Kb |
My Starter Kit For Codepen | 2,012 Kb |
Responsive Testimonial Slider v1.0 | 3,802 Kb |
Bourbon refill accordion tabs | 3,856 Kb |
Tout Pattern | 3,136 Kb |
Flexbox Media Object | 3,221 Kb |
Tout with hover content | 3,138 Kb |
A Pen by David Klotz | 5,064 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 |
Ripples in water | Nobitagit | 2,704 Kb |
NT Tribute | Skybutterfly | 2,850 Kb |
Rain Landing in a Pond | Edball | 3,009 Kb |
Sassy Buttons | Elyseholladay | 2,299 Kb |
Pure CSS Tooltip | APinix | 2,815 Kb |
Improve | Gavra | 1,652 Kb |
Sketchy Box | Mnicpt | 3,033 Kb |
A Pen by Sooba | Sooba | 2,516 Kb |
Starting out with Ember.JS | Cfleschhut | 4,808 Kb |
Simple personal profile | Miroot | 2,856 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!