<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>毛玻璃效果 - favnow.com</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body,
.item::before {
background: url('https://ae01.alicdn.com/kf/U0d8769b4e48342eca7d7ed699ca745a4K.jpg') no-repeat center fixed;
background-size: cover;
}
body {
height: 100vh;
width: 100vw;
display: flex;
justify-content: center;
align-items: center;
}
.item {
position: relative;
width: 60%;
height: auto;
padding: 30px;
border-radius: 10px;
box-shadow: 0 0 5px 1px #fff;
color: #fff;
font-size: 15px;
font-weight: lighter;
line-height: 35px;
overflow: hidden;
}
.item::before {
content: '';
display: block;
position: absolute;
z-index: -1;
top: 0;
left: 0;
right: 0;
bottom: 0;
margin: -20px;
filter: blur(10px);
}
h2 {
text-align:center;
color:#FFF;
}
p {
font-size:18px;
color:#FFFFFFCC;
text-decoration:underline;
}
</style>
</head>
<body>
<div class="item">
<h2>最长的电影</h2>
<p>我们的开始,是很长的电影,放映了三年,我票都还留着</p>
<p>i gonna always love you.</p>
</div>
</body>
</html>
暂无讨论,说说你的看法吧