0

我有关于响应式设计的问题。我得到了需要设置为容器背景图像的背景图像。但我不知道该怎么做。例如我试过这个 -

.container {
    width: 100%;
    background: url("img/bg3.svg") no-repeat;
    background-size: 100%;
    overflow: hidden;
    height: 100%;
}

到目前为止,我尝试了这个,如果我在移动高度大小上设置背景的 excat 大小会太多。有什么建议么?

4

1 回答 1

0

试试这个

.container {
        width: 100%;
        background: url("img/bg3.svg") no-repeat;
        background-size: cover;
        overflow: hidden;
        height: 100%;
    }
于 2021-03-05T18:39:36.260 回答