javascript - Jquery, resize image by width keeping constant height -
how can go resizing/cropping image height constant width gets smaller page resized?
the same effect can see in carousel here:
http://dai.com/
thanks,
did looked @ website image closely? because it's not resizing! it's centered in middle of img
element background
property. when alter width of screen see image center adjusted..
it's pretty simple accomplish effect using background
property:
background: url("img path") 50% 0 no-repeat;
the background image height of element.
example: here
javascript jquery
No comments:
Post a Comment