English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
Dieser Artikel beschreibt, wie man die Breite eines <iframe> in HTML mit Pixeln angibt und zeigt mit Online-Beispielen, wie man den HTML iframe width-Attribute, die Kompatibilität der Browser, die Syntaxdefinition und die detaillierten Informationen zu seinen Attributwerten verwendet.
festgelegte Höhe480-Pixel, Breite von280-Pixel-<iframe>:
<!DOCTYPE html> <html> <head> <title>HTML:<iframe> width Attribute - Basic Tutorial Website oldtoolbag.com</title> <body> <iframe src="/" width="480" height="280"> <p>Your browser does not support iframes.</p> </iframe> </body> </html>Test it out ‹/›
IEFirefoxOperaChromeSafari
All major browsers support the width attribute.
The width attribute specifies the width of the <iframe> in pixels.
In HTML 4.01In, the width can be defined in pixels or as a percentage of the containing element. In HTML5In, this value must be specified in pixels.
<iframe width="pixels">
Value | Description |
---|---|
pixels | Width in pixels (for example "200px" or just "200")。 |