问题
Since time immemorial, if you write:
<iframe scrolling="yes"></iframe>
Then, regardless of the content of the iframe, scroll bars are shown. If, like me, you use iframes a lot to display tabular data - with the table header outside the iframe, it is important to know that the scrollbars will always appear, so you can allow for the width of the scrollbar when making the table headings line up with the columns in the data.
So, what do you have to do to get IE 10 to display scroll bars on an iframe with scrolling="yes" set? If the content does not exceed the size of the iframe - IE 10 DOES NOT SHOW Scrollbars!
Here's a fiddle.Example of scrollbars not showing View it in Firefox and the scrollbars show. View it in IE 9 and the scroll bars show. View it in IE 10 and they don't.
回答1:
Note that WebKit browsers also don't show scroll bars.
If you set overflow: scroll; to the root (HTML) element of the document that will be used in the iframe, it will show the scroll bars as expected.
html { overflow: scroll; }
来源:https://stackoverflow.com/questions/16429894/how-to-get-ie-10-to-show-scrollbars-on-iframe