The height 100% of the img tag is not applied in HTML

Asked 2 years ago, Updated 2 years ago, 39 views

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>TEST</title>
    <style>
        img {
            max-width: 100%;
            height: auto
        }
    </style>
<body>
    <img src="http://i.imgur.com/0FZGckN.jpg">
</body>
</html>

I wish the image in the img tag would be full on the entire screen, but it keeps scrolling.

What should I do?

html html5

2022-09-22 13:56

1 Answers

Why don't we put the background-image in the css?

The image covering the top of the page programmers was put in css using the background-image.


2022-09-22 13:56

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.