我想将移动视图响应式网站加载到我的 HTML 页面中。
<!DOCTYPE html>
<html>
<head>
<title>full screen iframe</title>
</head>
<frameset rows="100%,*">
<frame src=
"https://en.wikipedia.org/wiki/HTML_element#Frames">
<noframes>
<body>
</body>
</noframes>
</frameset>
</html>
有了这个,我可以加载,但我想在我们在移动版本中打开维基百科时加载设计。
设置类似于移动设备的 iframe 大小应该可以。
<iframe src="https://en.wikipedia.org/" class="mobile-view"></iframe>
您还需要在 css 或 html 中定义 mobile-view 类。
<style>
.mobile-view {
width: 375px;
height: 667px;
border: none;
}
</style>