When using IFRAME on the page, setting the body width in the CSS style sheet and directly setting its width on the page results in different results.
Body {
Background-color: # ffffff;
Font-family: "";
Font-size: 12px;
Line-Height: 150%;
Clear: both;
Width: 1004px;
Margin: 10px auto;
Padding: 10px auto;
}
After setting the body width, we can see that the IFRAME width is also increased, which leads to incomplete display of the IFRAME content (if the IFRAME is set, no scroll bar appears );
<Body style = "width: 1004px;">
Set the body width directly on the page as shown above to get the correct effect.
Summary: I think IFRAME is also a Web page. The browser may also have a "body" tag when parsing it, setting the body width in the CSS style sheet changes both the page body and IFRAME body. The above is just speculation. I hope you will encounter similar problems to help.