📅  最后修改于: 2022-03-11 14:47:42.727000             🧑  作者: Mango
.parent {
width: 400px;
height: 300px;
}
.child {
width: 100%;
height: 100%;
background-color: black; /* fallback color */
background-image: url("images/city.jpg");
background-position: center;
background-size: cover;
}