gpt4 book ai didi

html - 创建响应式 iFrame

转载 作者:行者123 更新时间:2023-11-28 06:24:28 27 4
gpt4 key购买 nike

我在 Markeo(一种营销自动化软件工具)中创建了一个响应式登录页面。这是 Marketo 提供的 URL:http://info.onvia.com/responsive.html

我想做的是在我的网站 (www.Onvia.com) 上显示该 URL 并让它仍然响应。我认为创建 iFrame 并从 Marketo 引入该 URL 的唯一方法。我的问题是当该 URL 被引入 iFrame 时,它​​不会在手机上响应。我仍然需要放大才能看到内容。

这是我的 jsfiddle:http://jsfiddle.net/huskydawgs/3LAat/334/

HTML:

<div class="container">
<div class="h_iframe">
<iframe src="http://info.onvia.com/responsive.html" frameborder="0" allowfullscreen></iframe>
</div>

CSS:

html,body        {height:100%; margin:0;}
.h_iframe iframe {position:absolute;top:0;left:0;width:100%; height:100%; margin:0;}

最佳答案

尝试使用下面的代码

<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
html, body { height: 100vh; }
iframe {
height:350%;
width:100%;
</style>
</head>
<body>
<iframe src="http://info.onvia.com/responsive.html" frameborder="0"></iframe>
</body>
</html>

关于html - 创建响应式 iFrame,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35370415/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com