Css controls the image size, adaptive scaling, and is compatible with IE6 and Firefox. For example, we always encounter such problems in Daily website design, and the image size is unknown, the width of the content area of the website we designed is certain. If you set an equal width for all the images, the display will not work. By querying the CSS manual, we know that max-width and max-height can control the image size. If the image width exceeds the content area, the size is limited to the specified width, but the cup always occurs on IE6, A downloading station buddy contacted the Helper's house editor today. He also encountered this problem. He was very concerned about the support of IE6. Originally, the Helper's house had abandoned IE6, however, it is necessary to insert a knife for a friend, and the solution will naturally be available.
The Code is as follows:
Copy to ClipboardReference: [www.bkjia.com] <style type = "text/css">
. Content-width {MARGIN: auto; WIDTH: 600px ;}
. Content-width img {MAX-WIDTH: 100%! Important; HEIGHT: auto! Important; width: expression (this. width> 600? "600px": this. width )! Important ;}
</Style>
</Head>
<Body>
<Div <p> </p>
<P> </p>
</Div>
Tip:
The image width set above is PX, and the sample image is for the customer's house. Please replace the width and image address with your own.