Adding a background image to a
element

后端 未结 9 937
无人及你
无人及你 2020-11-28 04:09

Is it possible to make a

element contain a background image, and if so, how would I go about doing this?

9条回答
  •  -上瘾入骨i
    2020-11-28 04:44

    You can simply add an img src Attribute with id:

    
    
    
    

    and in your CSS file (stretch background):

    #backgroundimage
    {
       height: auto;
       left: 0;
       margin: 0;
       min-height: 100%;
       min-width: 674px;
       padding: 0;
       position: fixed;
       top: 0;
       width: 100%;
       z-index: -1;
    }
    

提交回复
热议问题