Blur Background Image
<!DOCTYPE html>
< html>
<head>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="STYLESHEET" type="text/css" href="web.css">
<title>web design</title>
</head>
<body>
<div class="bg-image"></div>
<div class="bg-text">
<h2>Blurred Background</h2>
<h1 style="font-size:50px ;">I am John Doe</h1>
<p>And I m a Photoshop</p>
</div>
</body>
</html>
CSS Blur Background Image Style
body{
height:100%;
margin: 0;
font-family: Arial, Helvetica, sans-serif;
}
*{box-sizing: border-box;}
.bg-image{
background-image: url(images.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;
}
No comments:
Post a Comment