我需要删除 iframe 中的垂直滚动条。我试过使用overflow: hidden;还是不行。请帮忙。
代码:
#iphone4 {
background-image: url("ipad_new2.png");
background-repeat: no-repeat;
height: 900px;
width: 750px;
margin: auto ;
position: relative;
overflow: hidden;
}
/*Mobile iframe CSS*/
iframe {
height: 700px;
width: 525px;
position: absolute;
top: 68px;
margin: auto ;
left: 61.99px;
overflow-y: scroll;
}
</style>
</head>
<body>
<div id="iphone4" >
<iframe src="index_atish.html" seamless="seamless"></iframe>
</div>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
溢出不是 HTML5 的解决方案,因为唯一错误支持此功能的现代浏览器是 Firefox。
当前的解决方案是将两者结合起来:
<iframe src="" scrolling="no"></iframe>
iframe { overflow:hidden; }
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
45740 次 |
| 最近记录: |