怎么让图片等比例缩放与显示器等宽 发表于 2017-03-31 | 分类于 面试题 style=”display: block;width: 100%;”1234567891011121314151617181920<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Title</title> <style> *{ margin: 0; padding: 0; } </style></head><body><div> <img style="display: block;width: 100%;" src="about_banner.png" alt=""> <img style="display: block;width: 100%;" src="about_advertise.png" alt=""></div></body></html>