The problem of automatically adapting to the size of pictures is a common problem in daily production. Here is a simple solution:
div img {
max-width:600px;
//The maximum width under other non-IE browsers such as IE7, FF, etc. is 600px;
width:600px;
//The size of the image in all browsers is 600px;
width:expression(document.body.clientWidth>600?"600px":"auto");
//When the image size is larger than 600px, it will automatically shrink to 600px;
overflow:hidden;
}