在WEB里如何设置iframe自适应


当前第2页 返回上一页

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

.wrap{

           width: 400px;

           margin: auto;

           border: 5px solid greenyellow;

       }

       .iframe-container{

           height: 0;

           padding-bottom: 97.6%;

           position: relative;

       }

       .iframe-container iframe{

           position: absolute;

           left: 0;

           top: 0;

           width: 100%;

           height: 100%;

       }

       @media screen and (max-width: 400px) {

           .wrap{

               width: 300px;

           }

       }

<div class="wrap">

       <div class="iframe-container">

           <iframe height=498 width=510 src="<a href="http://player.youku.com/embed/XOTE0MjkyODgw">http://player.youku.com/embed/XOTE0MjkyODgw</a>" frameborder=0 allowfullscreen></iframe>

       </div>

   </div>

相信看了这些案例你已经掌握了方法,更多精彩请关注php中文网其它相关文章!

相关阅读:

怎样用h5的sse服务器发送EventSource事件

h5如何实现记住密码功能

H5的页面中怎样调用APP功能

以上就是在WEB里如何设置iframe自适应的详细内容,更多文章请关注木庄网络博客

返回前面的内容

相关阅读 >>

webkit的css扩展效果

解决iframe嵌套页面无法全屏的问题

怎么自学web全栈

web网页设计尺寸规范介绍

基于html5的web scada报表图文代码详解

基于html5的web跨设备超声波通信方案详解

在web项目中错误代码整理

html5如何使用web storage储存?web storage储存的2种方式(示例)

教你在iframe标签中制作滚动条样式,iframe标签的用法介绍

html5web存储实例代码

更多相关阅读请进入《iframe》频道 >>




打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...