简体   繁体   中英

Iframe Image default zoom out issue

I am loading an image through iframe and have removed default styling of zoom and auto-scrolling. Now I am facing issue in showing image in IE and Chrome when the image dimension is 1024*768(when picking up image from the Sample Picture of windows) and it is working fine for smaller dimension picture 200*100. The problem is only part of the image is showing up. I guess it is the zoom issue of chrome and ie. Please help me in counter this issue.

Code which I have done for IFrame is

<div class="dataGroup inline-inputs" >  
<label for="_erCurrentLogo">Current Logo:</label>
<iframe id="imgLogo"  frameborder="0" width="100%" height="100%" scrolling="no"></iframe>
<a id="deleteEmployerLogo" href="javascript:void(0)" onClick="deleteLogo();return false">delete</a> 
</div>

Chrome和IE中出现图片问题Chrome和IE中出现图片问题

This is my suggestion for your issue;

I guess you have set width and height for the iframe. (below is the sample code I used)

#imgLogo  
{   
    width:200px;  
    height:100px;  
}  

Use that same height and width for the image in your iframe referenced page.

img  
{   
    width:200px;  
    height:100px;  
} 

Only thing you have to do is make the image and iframe height and width to same.

样品

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM