css样式:
<style>
.iframe-parent-box{
position: relative;
overflow: hidden;
height:400px;
width: 864px;
background-color: orange;
}
.iframe-parent-box>#iframe-shrink{
position: absolute;
left: -527px;
top: -263px;
transform: scale(0.44);
}
</style>
<body>
<div class="iframe-parent-box">
<!-- vue 中src地址不能写死,应用v-model双向绑定 window.origin + url -->
<!-- vue示例:-->
<!-- iframeUrl = window.origin + url -->
<!-- <iframe id='iframe-shrink'-->
<!-- :src="iframeUrl"-->
<!-- width="1920px" height="920px"></iframe>-->
<!-- html示例 -->
<iframe id='iframe-shrink'
src="http://www.baidu.com"
width="1920px" height="920px"></iframe>
</div>
</body>
成品: