2014-10-03 75 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>