Resizing the image in php for viewing purposes only

后端 未结 15 1718
面向向阳花
面向向阳花 2020-12-14 13:09

Okay, the reason I posted this is because I wasn\'t sure what to search for. I\'ll try to explain it as clearly as I can.

Say, I have an image sized 800x600. The box

15条回答
  •  暖寄归人
    2020-12-14 13:32

    I think a simple solution with no stress and processin work would be with css:

    1) Apply a class which will give you a cropped image. Do this with help of negative margin. I haven'nt used the exact margin use it as you require. 2) On hover overwrite the marging attribute, so that it will give you the real image.

    css:
     
    

    html:

    
    

提交回复
热议问题