How to easily get a responsive full screen image background with text overlay in HTML such as this:
The image was taken from here and you can view a working CodePen here.
The HTML code:
<div class='image-background'>
<div class='container h-100'>
<div class='row h-100 align-items-center'>
<div class='col-12 text-center'>
<h1 class='display-2'>This is LA</h1>
<p class='lead'>Image taken from /r/wallpapers</p>
</div>
</div>
</div>
</div> CSS code:
body {
color: white;
}
.image-background {
height: 100vh;
min-height: 500px;
background-image: url("https://i.redd.it/9qgaiif7gum31.jpg");
background-size: cover;
background-position: center;
background-repeat: no-repeat;
} Thats it!
A drained and empty Kennington reservoir images from a drone in early July 2024. The…
Merrimu Reservoir from drone. Click images to view larger.
Using FTP and PHP to get an array of file details such as size and…
Creating and using Laravel form requests to create cleaner code, separation and reusability for your…
Improving the default Laravel login and register views in such a simple manner but making…
Laravel validation for checking if a field value exists in the database. The validation rule…