开发者

how to add background image in a webpage by using css

which tag and css we will use for adding b开发者_如何学Goackground image and how remake it's size full length I have tried by using external css in html of head section background-image: url() ;


You have two options: either create it in your in CSS or read the documentation in w3school.

example :

<html>
<head>
<style>
   body {
    background: url(https://cdn.urldecoder.org/assets/images/url-fb.png);
    background-repeat: no-repeat;
    background-size: 100% 100vh;
  </body>
</head>
<body>

<p>hello</p>

</body>


<html>
<body>
<style>
    body {
      background: url(# write the address of image);
      background-size: 100%;
    }
</style>

<p>HOPE IT HELPS !</p>
</body>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜