CSS: Full Size background image

前端 未结 6 1361
失恋的感觉
失恋的感觉 2020-12-15 22:04

Trying to get full size background image with:

html {
    height: 100%;
    background:url(\'../img/bg.jpg\') no-repeat center center fixed;
    background-s         


        
6条回答
  •  隐瞒了意图╮
    2020-12-15 22:31

    I have same problem I use this CSS on body

    background: url(image.jpg);
        background-color: rgba(0, 0, 0, 0);
        background-position-x: 0%;
        background-position-y: 0%;
        background-size: auto auto;
    background-color: #0a769d;
    height: 100%;
    min-height: 100%;
    max-height: 100%;
    width: 100%;
    background-size: 100% 100%;
    background-position: center;
    max-width: 100%;
    min-width: 100%;
    top: 0;
    left: 0;
    padding: 0;
    margin: 0;
    

提交回复
热议问题