I'm trying to show 4 webpages in a single webpage, so basically divide the screen in 4 quadrants and each quadrant displays a webpage. I've done this include the below code in Python's flask web framework using HTML. However, the image doesn't scale properly to relect the changes in the browser window size and shows scroll bars. How can I fix this? Cheers!
from flask import Flask
app=Flask(__name__)
@app.route('/')
def home():
url="http://www.designpointfurniture.com/wp-content/uploads/2019/01/test-5.jpg"
return """
<iframe id="1" src="http://www.designpointfurniture.com/wp-content/uploads/2019/01/test-5.jpg" style="float:right;height:50%;width:50%;border:none;overflow:hidden;position:relative;object-fit:scale-down;"></iframe>
<iframe id="2" src="http://www.designpointfurniture.com/wp-content/uploads/2019/01/test-5.jpg" style="float:left;height:50%;width:50%;border:none;overflow:hidden;position:relative;object-fit:fill;"></iframe>
<iframe id="3" src="http://www.designpointfurniture.com/wp-content/uploads/2019/01/test-5.jpg" style="float:right;height:50%;width:50%;border:none;overflow:hidden;position:relative;object-fit:contain;"></iframe>
<iframe id="4" src="http://www.designpointfurniture.com/wp-content/uploads/2019/01/test-5.jpg" style="float:left;height:50%;width:50%;border:none;overflow:hidden;position:relative;object-fit:none;"></iframe>
"""
if __name__=='__main__':
app.run("0.0.0.0", port="8005")
It sounds like your Real question is "Can I make iframes responsive?" and the answer is... No. iframes are notorious for NOT being responsive.
Depending on the purpose of your page, you could:
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.