我在将绝对/固定元素的背景应用模糊时遇到了问题,因为它似乎不会模糊页面的主要内容,只会模糊绝对元素本身的内容.我目前的警报样式如下:@H_301_2@
@H_301_2@
.alert-wrap {
position: fixed;
z-index: 10;
right: 0;
bottom: 0;
}
.alert-wrap .alert {
display: block;
background-color: rgba(215,44,0.5);
margin: 0 15px 15px 0;
position: relative;
}
.alert-wrap .alert:before {
content: "";
position: absolute;
height: 100%;
width: 100%;
top: 0;
bottom: 0;
left: 0;
right: 0;
-webkit-filter: blur(10px);
-moz-filter: blur(10px);
-o-filter: blur(10px);
-ms-filter: blur(10px);
filter: blur(10px);
}
我希望这会模糊警报元素的背景,使其背后的主要内容看起来模糊(更多地关注元素本身),但是甚至没有找到任何确认存在这个问题的东西.@H_301_2@
HTML文档流程如下:@H_301_2@
@H_301_2@
PHP
//constructing navbar
?>
PHP
//constructing footer
?>
图片示例:
最佳答案