html - Overlay image to show like panorama -
i looking how overlay image in css show panorama. cannot find right logic build it. maybe hiding heights way did not me.
solved.. 1 more idea brought me clear problem.. anyway if needs here solution
<div style="position: relative; height:100px; overflow:hidden"> <img src="photo.jpg" style="margin-top:-50px;" /> </div> just set height of div tag , correct image position margin-top.
if has way please share. thanks
thanks others replied me.
an example size of image following css:
div{ overflow: hidden; padding-bottom: 56.25%; padding-bottom: calc(100%*9/16); position: relative; } div img { top: 0; bottom: 0; position: absolute; width: 100%; margin: auto; } you can see example in http://jsfiddle.net/poselab/9vwu8/4/
Comments
Post a Comment