2014-10-03 49 views
0

我的iframe,我需要把它移动到某个地方,也许你还没有理解我
的不尊重
我想要做的是从里面SRC让我的iframe的举动= “”,所有的iframe都是这样来的
position:absolute; top:0px;左:0px
我的意思是在左上角。我想把它做成右上角或类似的东西,但更准确
我希望能帮助我,并认为。如何移动IFRAME中的src内

<iframe id='iframe_top' src="http://www.w3schools.com/tags/att_iframe_height.asp"scrolling="no" marginheight="300" > 

回答

0

您需要使用CSS:

<div class="container"> 
    <iframe id='iframe_top' src="http://www.w3schools.com/tags/att_iframe_height.asp"scrolling="no" marginheight="300" > 
</div> 

而且你的CSS:

.container { 
    position: relative; 
    height: 800px; 
} 

.container iframe { 
    position: absolute; 
    top: 0; 
    right: 0; 
} 

你可以把CSS代码<style>标签内你<head>

<head> 
    <style> 
     /* YOUR CSS */ 
    </style> 
</head>