1. Drag with the mouse to change the size
2 , Use mouse scrolling to control picture size
3. Use code to control the size of the image tag
4. CSS control image size
1. css2 direct implementation: img{max-width: 500px;} (IE is not supported yet)
2. Expression implementation: img{width:expression(width>500?"500px":width);} (IE only)
3. Use js. Method: Use document.getElementsByTagName("IMG") to get all img elements Traverse the img element to determine its width and perform corresponding operations
Statement: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