gpt4 book ai didi

javascript - Iframe 图片默认缩小问题

转载 作者:行者123 更新时间:2023-11-28 01:59:54 24 4
gpt4 key购买 nike

我正在通过 iframe 加载图像,并删除了缩放和自动滚动的默认样式。现在,当图像尺寸为 1024*768(从 windows 的示例图片中拾取图像时)时,我在 IE 和 Chrome 中显示图像时遇到问题,并且它对于较小尺寸的图片 200*100 工作正常。问题是只显示了部分图像。我猜是chrome和ie的缩放问题。请帮我解决这个问题。

我为 IFrame 做的代码是

<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>

Pic issue comping up in Chrome and IE Pic issue comping up in Chrome and IE

最佳答案

这是我对你的问题的建议;

我猜你已经为 iframe 设置了 widthheight。 (下面是我使用的示例代码)

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

为您的 iframe 引用页面中的图像使用相同的 heightwidth

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

您唯一需要做的就是使 imageiframe 高度和宽度 相同。

sample

关于javascript - Iframe 图片默认缩小问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14557525/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com