主頁
HTML
HTML 響應式
Tryit:影像:原始尺寸或更小
執行 ❯
建立您
自己的
網站
×
更改方向
儲存程式碼
更改主題,深色/淺色
前往 Spaces
<!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1.0"> </head> <body> <h2>Responsive Image</h2> <p>"max-width:100%" prevents the image from getting bigger than its original size. However, if you make the browser window smaller, the image will still scale down.</p> <p>Resize the browser window to see the effect.</p> <img src="img_girl.jpg" style="max-width:100%;height:auto;"> </body> </html>