我的大部分程序都会进行验证,但这一部分:
<iframe src="link.html" width='800' height='500' scrolling="no">
</iframe>
出现此验证错误:
“错误: iframe元素上的滚动属性已过时。请改用CSS。”
我试过使用overflow: hidden,这似乎是常见的解决方案,但用户仍然可以滚动。我希望iframe没有滚动条,用户无法滚动。
谢谢你的帮助。
发布于 2018-06-13 05:00:33
尝试使用css:
iframe {
width:800px;
height:500px; /* you have to specify width and heigth, otherwise overflow has no meaning */
overflow-x:hidden;
overflow-y:hidden
}
/* optionally, you could add the following code, to keep scrolling (but not the scrollbar) for touchscreen devices */
iframe::-webkit-scrollbar {
display: none;
}
https://stackoverflow.com/questions/50825518
复制相似问题