Eliminate Scrollbars in HTML Iframes
Q: Despite specifying scrolling="no" and applying overflow: hidden to an iframe, it still displays scrollbars. How can these scrollbars be removed?
A: While the issue cannot be vollständig resolved using only HTML and CSS in fully-compliant HTML5, most browsers still support the scrolling property. Combining the scrolling="no" attribute with overflow: hidden in CSS will render the scrollbars invisible in most modern browsers, including IE10, Chrome 25, and Opera 12.12.
However, this approach may become obsolete as browsers continue to update. For a more versatile solution, consider implementing the JavaScript method available at http://www.christersvensson.com/html-tool/iframe.htm.
The above is the detailed content of How to Eliminate Scrollbars in HTML Iframes?. For more information, please follow other related articles on the PHP Chinese website!