最近写了一个简单的毛玻璃效果,操作流程是以一个图片为背景并模糊,同时再在此背景上加上一层半透明的效果就制成毛玻璃的特效,但是想在毛玻璃上输入文字却一直不显示,求一下问题出在哪里?如何解决?
html部分:
关于我
<--此处不显示--!>
关于我
<--此处不显示--!>
css部分:
.about{
background: url(../images/home.jpg) no-repeat center center fixed;
height: 100%;
position: relative;
width: 100%;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
-webkit-filter: blur(10px); /* Chrome, Opera */
-moz-filter: blur(10px);
-ms-filter: blur(10px);
filter: blur(10px);
}
.about .intro{
background:rgba(0,0,0,0.2) no-repeat center fixed;
height: 100%;
position: relative;
width: 100%;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
.about 这个设置blur。你里面的内容也模糊了
.about .intro 这个你应该用absolute,top:0;left:0这样才能确保覆盖住了
和.about同级放一个p。给这个p设置absolute。就可以看到了,不行的话,再设置absolute