当前位置:网站首页>iframe嵌套其它网站页面 全屏设置
iframe嵌套其它网站页面 全屏设置
2022-07-25 15:06:00 【深海蓝山】
今天在使用iframe时,发现嵌套页面中有个【全屏】功能,不好使,查了一下,发现iframe还有1个属性allowfullscreen设置,可以设置是否支持全屏,默认是false,现在把iframe的基础属性整理一下。
iframe基本属性
通常我们使用iframe主要设置 src,宽、高,是否滚动,其实有一些不常用的属性
<iframe src="https://www.baidu.com" frameborder="0" width="80%" height="500px"></iframe>iframe常用属性:
1.frameborder:是否显示边框,1(yes),0(no)
2.height:框架作为一个普通元素的高度,建议在使用css设置。
3.width:框架作为一个普通元素的宽度,建议使用css设置。
4.name:框架的名称,window.frames[name]时专用的属性。
5.scrolling:框架的是否滚动。yes,no,auto。
6.src:内框架的地址,可以使页面地址,也可以是图片的地址。
其他装饰属性:
- allowtransparency:true or false,是否允许iframe设置为透明,默认为false
- allowfullscreen:true or false,是否允许iframe全屏,默认为false
<iframe id="ifrm" width="80%" height="600px"
frameborder="0" src="target.html" marginwidth="0" marginheight="0" vspace="0"
hspace="0" allowtransparency="true" scrolling="no" allowfullscreen="true">
</iframe>设置了allowfullscreen=“true”,iframe就可以支持全屏了
边栏推荐
猜你喜欢

【JS高级】js之正则相关函数以及正则对象_02

Visual Studio 2022 查看类关系图

System. Accessviolationexception: an attempt was made to read or write to protected memory. This usually indicates that other memory is corrupted

防抖(debounce)和节流(throttle)

45padding不会撑开盒子的情况

Melody + realsense d435i configuration and error resolution

VS2010 add WAP mobile form template

树莓派入门:树莓派的初始设置

32 chrome调试工具的使用

06. Neural network like
随机推荐
API health status self inspection
"Ask every day" reentrantlock locks and unlocks
Install entityframework method
sql server强行断开连接
Browser based split screen reading
SQL Server forcibly disconnects
冈萨雷斯 数字图像处理 第一章绪论
没错,请求DNS服务器还可以使用UDP协议
处理ORACLE死锁
Raft of distributed consistency protocol
LeetCode第 303 场周赛
43 盒子模型
"Ask every day" what is volatile
006 operator introduction
pkg_ Resources dynamic loading plug-in
Handle Oracle deadlock
ice 100G 网卡分片报文 hash 问题
Leo-sam: tightly coupled laser inertial odometer with smoothing and mapping
TypeScript学习2——接口
Spark parameter adjustment and tuning