温馨提示:本文共600个字,读完预计2分钟。
通过设置frame的背景颜色透明度实现蒙版效果。
代码如下:
api.openFrame({
name: 'search_frm',
url: './main_frame/common/search_frm.html',
rect: {
x: 0,
y: top,
w: 'auto',
h: 'auto'
},
pageParam: {
top: top
},
bounces: false,
bgColor: 'rgba(248,248,255,0.0)',
vScrollBarEnabled: true,
hScrollBarEnabled: true,
});
通过设置背景的rgba的透明度来实现蒙版效果,这里要注意一点,frame中的html和body背景颜色需要继承父类的背景颜色,否则背景还是没有透明的。
————————————————
版权声明:本文为CSDN博主「MrSunOcean」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/MrSunOcean/article/details/79518041