我可以强制iframe显示某些部分的页面使用CSS或jQuery [英] Can i force iframe to show certain part of page using css or jQuery

查看:137
本文介绍了我可以强制iframe显示某些部分的页面使用CSS或jQuery的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想显示其中一个网站的视频,因为我不能消费它虽然使用iframe和一些只显示视频部分的iframe。

I want to show video from one of the website since i cant consume it i though of using iframe and some how show only video part of the iframe.

<iframe src="http://www.dmi.ae/live.asp?lang=en&ChannelID=2" width="650" height="476" >
</iframe> 

jsFiddle

我不知道如何使用jQuery只显示嵌入了视频的DIV包装器

I am not sure how i can using jQuery to show only DIV wrapper which has video embedded

< div class =floatFirst omega_t3> 或仅由 css if我们可以

<div class="floatFirst omega_t3"> or just by css if we can

推荐答案

我的解决方案适合我的要求相比,提供 ConnorRoberts 如在他的解决方案社交媒体插件浮动,这不是我想要的,当我包装iframe与 div 如示例中隐藏的一切 example

My solution works suites my requirement as compared to one provided ConnorRoberts as in his solution social media plugin floats which is not what i want when i wrap iframe with div as shown in example it hides everything example

#my-div
{
    width    : 650px;
    height   : 500px;
    overflow : hidden;
    position : relative;
}

#my-iframe
{
    position : absolute;
    top      : -320px;
    left     : -150px;
    width    : 1280px;
    height   : 1200px;
}

<div id="my-div">
<iframe id="my-iframe"  src="http://www.dmi.ae/live.asp?lang=en&ChannelID=2" width="650" height="476" scrolling="no"  >
</iframe>

</div>

这篇关于我可以强制iframe显示某些部分的页面使用CSS或jQuery的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆