background half screen

How to Position Background Image in the Half of the Screen


.container {
    height: 100vh;
}   
.container::before {
    content: "";
    display: block;
    position: absolute;
    height: 100%;
    width: 50%;
    left: 0;
    top: 0;
    background: #fff;
    z-index: 1;
}

.container::after {
    content: "";
    display: block;
    position: absolute;
    height: 100%;
    width: 50%;
    right: 0;
    top: 0;
    background: url("") no-repeat center right;
    background-size: auto;
    background-size: auto;
    background-size: cover;
    z-index: 0;
}