layer.open 高度自适应


Warning: strpos(): Empty needle in /mnt/extdata/wwwroot/freebasic.ts/wp-content/themes/kratos-pjax-master/functions.php on line 168

这里只是高度,

layer.open({
    type: 2, //iframe加载http
    title:'百度页面',
    area: '300px',
    shade: 0.5,
    content:'www.baidu.com',
    success: function(layero, index) {
        //对加载后的iframe进行高度自适应
        layer.iframeAuto(index);
    }
});

仅限高。

宽度请参考我的上篇:

https://www.freebasic.cn/p/2529.html

iframe页内修改open.layer的样式自适应处理

点赞

发表评论

电子邮件地址不会被公开。必填项已用 * 标注