当前位置:网站首页>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就可以支持全屏了
边栏推荐
猜你喜欢

Award winning interaction | 7.19 database upgrade plan practical Summit: industry leaders gather, why do they come?

node学习

Visual Studio 2022 查看类关系图

防抖(debounce)和节流(throttle)

ESXI6.7.0 升级到7.0U3f(2022年7月12 更新)
![[Nacos] what does nacosclient do during service registration](/img/76/3c2e8f9ba19e36d9581f34fda65923.png)
[Nacos] what does nacosclient do during service registration

006操作符简介

I2C device driver hierarchy

43 盒子模型

Share a department design method that avoids recursion
随机推荐
oracle_12505错误解决方法
[Nacos] what does nacosclient do during service registration
继承的实现过程及ES5和ES6实现的区别
Reprint ---- how to read the code?
Add the jar package under lib directory to the project in idea
sql to linq 之存储过程偏
006 operator introduction
Universal smart JS form verification
[C题目]力扣88. 合并两个有序数组
The solution to the problem that the progress bar of ros2 installation connext RMW is stuck at 13%
LeetCode第 303 场周赛
[C topic] Li Kou 206. reverse the linked list
Yes, UDP protocol can also be used to request DNS server
js URLEncode函数
L1 and L2 regularization
Yarn: the file yarn.ps1 cannot be loaded because running scripts is prohibited on this system.
Melody + realsense d435i configuration and error resolution
Overview of cloud security technology development
解决asp.net上传文件时文件太大导致的错误
Browser based split screen reading