css - 适用于 iPad 的响应式 iframe 中心

标签 css iframe

你好,我有问题,因为 iframe 对 ipad 没有响应 这是我的 iframe 代码 css

iframe {

float:center;
width: 100%;
vertical-align: middle;

max-width: 100%;



}

enter link description here

最佳答案

我没有在 iPad 上检查过,但是 float 没有中心。

试试这段代码

CSS

iframe{
    margin-left:auto;
    margin-right:auto;
    display:block;
    float:none;
    max-width: 150px /* if you use 100% it will fill whole screen */
}

关于css - 适用于 iPad 的响应式 iframe 中心,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30735945/

相关文章:

javascript - 如何阻止 jQuery 缓冲悬停效果?

javascript - 我想用表体数据滚动固定表头?

javascript - 如何解决iframe跨域问题

javascript - jquery or not/Cross Browser Compatible iframe resize (IE, Chrome, Safari, Firefox)

javascript - iFrame 属性不会通过 JS DOM 更新

java - 如何遍历 iFrame 中的不同框架?

jquery - 下载选项在 iOS 设备中不起作用

html - Bootstrap : Auto-adjustable grid layout with different item sizes?

javascript - 使用 Jquery 切换 css 类

javascript - 指针事件为 null 的元素上的“单击”(或替代方法)