当前位置:网站首页>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就可以支持全屏了
边栏推荐
- node学习
- ice 100G 网卡分片报文 hash 问题
- MFC 线程AfxBeginThread基本用法,传多个参数
- 深入:微任务与宏任务
- Universal smart JS form verification
- Visual Studio 2022 查看类关系图
- VS2010 add WAP mobile form template
- SPI传输出现数据与时钟不匹配延后问题分析与解决
- 44 Sina navigation, Xiaomi sidebar exercise
- Solve the error caused by too large file when uploading file by asp.net
猜你喜欢

Sudo rosdep init error ROS installation problem solution

Vs2010添加wap移动窗体模板

瀑布流布局

"Ask every day" briefly talk about JMM / talk about your understanding of JMM

Deployment and simple use of PostgreSQL learning

Splice a field of the list set into a single string

41 picture background synthesis - colorful navigation map

6线SPI传输模式探索

【微信小程序】小程序宿主环境详解

006操作符简介
随机推荐
39 简洁版小米侧边栏练习
Scala111-map、flatten、flatMap
dpdk 收发包问题案例:使用不匹配的收发包函数触发的不收包问题定位
浏览器工作流程(简化)
树莓派入门:树莓派的初始设置
Splice a field of the list set into a single string
ESXI6.7.0 升级到7.0U3f(2022年7月12 更新)
[C topic] the penultimate node in the Niuke linked list
Ssh server rejected password
"How to use" agent mode
云安全技术发展综述
Implementation of redis distributed lock
006操作符简介
Spark002---spark任务提交,传入json作为参数
Automatically set the template for VS2010 and add header comments
Gonzalez Digital Image Processing Chapter 1 Introduction
How many ways can you assign initial values to a two-dimensional array?
EDA chip design solution based on AMD epyc server
37 元素模式(行内元素,块元素,行内块元素)
【微信小程序】小程序宿主环境详解