Home html How to stretch the picture to full screen?

How to stretch the picture to full screen?

Author

Date

Category

How to stretch a picture to full screen if I write this HTML code

& lt;! DOCTYPE HTML PUBLIC "- // W3C // DTD HTML 4.01 Trancitional // EN" "http: //www.w3.org/TR/html4/loose.dtd">
& lt; html & gt;
  & lt; head & gt;
    & lt; meta http-equiv = "Content-Type" content = "text / html; charset = utf-8" & gt;
    & lt; title & gt; Glossary & lt; / title & gt;
  & lt; / head & gt;
  ** & lt; body background = "img / image.jpg" align = "center" width = "250" height = "150" & gt; **
    & lt; center & gt; & lt; h1 & gt; Glossary & lt; / h1 & gt; & lt; / center & gt;

Answer 1, authority 100%

CSS3:

body {
    background: url (img / image.jpg) no-repeat center center fixed;
    background-size: cover;
}

More options .


Answer 2

& lt; body background = "img / image.jpg" width = "100%" height = "100%" & gt;

Answer 3

It is important not to forget to put quotes: background: url ("img / image.jpg") , otherwise on screens with some resolution a “strip” may appear at the bottom – the uppermost part of the background image is lowered.

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions