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 |
A Pen by David Klotz | 5,064 Kb |
Tout with hover content | 3,138 Kb |
Tout box hover content overlay | 4,242 Kb |
Flexbox Layout | 3,647 Kb |
Responsive Testimonial Slider v1.0 | 3,802 Kb |
Bourbon refill accordion tabs | 3,856 Kb |
Tout Pattern | 3,136 Kb |
Basic Fullscreen Hero | 3,040 Kb |
My Starter Kit For Codepen | 2,012 Kb |
CSS Transitions Transforms Reveal v1.0 | 4,083 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 |
CSS Parent Selector | Tomhodgins | 2,143 Kb |
Alter bg opacity on hover... | Chrisboon27 | 2,054 Kb |
RSW | JordanC | 3,726 Kb |
Testing Portfolio Page | Sideshowli | 3,395 Kb |
Search field | Jamesbarnett | 2,100 Kb |
Simple Carousel Pure CSS | Dangvanthanh | 4,080 Kb |
Bubble animation | Ftabor | 6,565 Kb |
Siema - add pagination to prototype | Pawelgrzybek | 2,575 Kb |
A Pen by Sooba | Sooba | 2,516 Kb |
CSS-Flexbox-Demo | Sstiglets | 1,709 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!