最佳答案
为此尝试 jquery
$('iframe').contents().find('img').css({width: '100%', 'height': '100%'});
如果 iframe 在页面加载后稍后加载,则将其包装在 jQuery 加载回调中
$('iframe').load(function() {
$(this).contents().find('img').css({width: '100%', 'height': '100%'});
})
关于css - 如何在iframe中定位图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37026819/