There is an iframe in a div. The div is required to display part of the content of the iframe, and the div is required to change proportionally as the browser becomes larger or smaller. How to achieve this?
You can also use javascript to do it, as long as it can be implemented.
Ask the experts to give it a try. If you don’t score enough, you can get extra points!
Is that so?
<style>html,body{height:100%;}</style><div style="width:50%;height:50%;position:relative;"><iframe src="http://www.baidu.com" style="width:100%;height:100%;position:absolute;top:0px;left:0px;"></iframe></div>
The content displayed by the iframe is controlled by the width, and the div is used as a percentage as the browser becomes larger or smaller,