Home > Web Front-end > JS Tutorial > css image adaptive size_image special effects

css image adaptive size_image special effects

WBOY
Release: 2016-05-16 19:07:41
Original
1763 people have browsed it
Copy code The code is as follows:

function ReImgSize(){ 
                                              ;document.images.length;j )                                                                                           ;                                                                                                                                                                                                                     . Tested and passed on Mozilla and IE. Let me add here about the adaption of images. Mozilla does this better than IE because CSS can be used to control the adaption of images. We all know that Mozilla supports a max-width CSS syntax. So we define the global style of the picture like this.




Copy code


The code is as follows:
img{ max-width:100%; height:auto; } In this way, the image will automatically adapt to its size within the div or table.
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template