简体   繁体   English

如何强制放大图片

[英]How to force enlarge a picture

Lets say there is a picture that has width:300 and height:400... 可以说有一幅图片的宽度为300,高度为400 ...

Is there anyway to force these pictures to enlarge at size of width:500 and height:500 in html or in php? 无论如何,在html或php中是否强制这些图片以width:500和height:500的大小放大?

<img src="<?php echo "/uploads/store/logo/".$store['logo'];?>" width="460" height="590" alt="" class="front-image"> 
                  <img src="<?php echo "/uploads/store/logo/".$store['logo'];?>" width="460" height="590" alt="" class="back-image"> 

What I tried to do it this 我试图做到这一点

<div style="width:460px; height: 590px;">
                    <a href="#"> 
                  <img src="<?php echo "/uploads/store/logo/".$store['logo'];?>" width="460" height="590" alt="" class="front-image"> 
                  <img src="<?php echo "/uploads/store/logo/".$store['logo'];?>" width="460" height="590" alt="" class="back-image"> 
                  <span class="single-pro-quick-view"> <span class="single-pro-quick-table"> <span class="single-pro-quick-table-cell"> <i class="fa fa-search"></i> </span> </span> </span> 
                  </a>
                  </div> 

simply set the height and width inside the tag, or use css 只需在标签内设置高度和宽度,或使用CSS

example: 例:

<img src="http://cdn.sstatic.net/Sites/stackoverflow/img/apple-touch-icon@2.png?v=73d79a89bded&a" width="500px" height="500px">

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM