javascript - iframe Why do the scroll bars appear like this when loading a web page?
仅有的幸福
仅有的幸福 2017-05-16 13:26:44
0
1
560

Excuse me, what are you asking about?iframeWhen loading a large page, a small scroll bar appears first. The page only displays so much, and then it takes a while to display all of them. Is there any way to directly display all of them? , this is so ugly. . .

仅有的幸福
仅有的幸福

reply all(1)
淡淡烟草味

followed by iframe的大小有关,如果确定iframe的大小而非自适应内容的话,建议设定好iframewidth,height or:

html, body, iframe {
    width: 100%;
    height: 100%;
}

Sample code:

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        html,body,iframe{
            width: 100%;
            height: 100%;
            margin: 0;
            padding: 0;
            overflow: hidden;
        }
    </style>
</head>
<body>
    <iframe src="http://www.qq.com/" frameborder="0"></iframe>
</body>
</html>    
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template