我尝试了模糊和透明的jgrowl通知背景,但只是透明的作品。当模糊时,内容也会模糊。内容是指文本通知。我不会背景透明,模糊而不满足。 THIS jsfiddle
CSS:
.test{
background-color:rgba(102, 204, 153,0.95);
color:#fff;
font-weight:bold;
border:1px #fff solid;
filter: blur(5px) ;
}
JGROWL:
<script type="text/javascript">
$(function() {
$.jGrowl("<p class='upper'><i class='fa fa-exclamation-triangle' aria-hidden='true'></i> <?=$row['NTFY_TTL'];?></p><?=$row['NTFY_DESC'];?><br> <small>Posted <?=$row['BEG_DT'];?></small>", {
theme: 'test',
position: 'top-right',
life: 3000
});
});
</script>
答案 0 :(得分:1)
可能有更好的方法,但也可以在空div的帮助下完成请在实施前检查所需的浏览器兼容性
<强> HTML 强>
<div class="test">
<span class="test2">
</span>
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Labore quod atque ipsam cupiditate eum, debitis illo repudiandae aperiam dolorum quae neque praesentium, quis vero iure distinctio natus quisquam consequuntur officiis.
</div>
<强> CSS 强>
.test {
position: relative;
z-index: 10;
}
.test2{
background-color:rgba(102, 204, 153,0.95);
color:#fff;
font-weight:bold;
border:1px #fff solid;
filter: blur(5px) ;
position: absolute;
width: 100%;
height: 100%;
top: 0;
z-index: -1;
}