CSS를 사용하여 배경 이미지에 대한 응답성을 달성하기 위해 다음 코드를 실행할 수 있습니다 -
예시
<!DOCTYPE html>
<html>
<head>
<meta name = "viewport" content="width = device-width, initial-scale = 1.0">
<style>
div {
width: 100%;
height: 300px;
border: 2px dashed blue;
background-image: url('https://www.tutorialspoint.com/python/images/python-data-science.jpg');
background-repeat: no-repeat;
background-size: contain;
}
</style>
</head>
<body>
<p>To check the effect, you need to resize the browser.</p>
<div></div>
</body>
</html>