To make your website more beautiful, you can use different styles and effects for different parts. In this code, we have a photo that is located on the full screen and the entire website is located on this photo. For example, a text box with an almost transparent background is placed on it and the desired text is written inside it. This image has a blur filter and therefore interferes with the texts and photos of the website.
HTML
<!-- This script got from www.devanswer.com -->
<div class="bg-image"></div>
<div class="bg-text">
<h2>Blurred Background</h2>
<h1 style="font-size:50px">My Name Is</h1>
<p>And I'm a Photographer</p>
</div><div id="bcl"><a style="font-size:8pt;text-decoration:none;" href="http://www.devanswer.com">Developers Answer</a></div>
CSS
body, html {
height: 100%;
margin: 0;
font-family: Arial, Helvetica, sans-serif;
}
* {
box-sizing: border-box;
}
.bg-image {
background-image: url("https://devanswer.com/img/photographer.jpg");
filter: blur(8px);
-webkit-filter: blur(8px);
height: 100%;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
}
.bg-text {
background-color: rgb(0,0,0);
background-color: rgba(0,0,0, 0.4); color: white;
font-weight: bold;
border: 3px solid #f1f1f1;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
z-index: 2;
width: 80%;
padding: 20px;
text-align: center;
}