html - css disproportionate image scaling -


i apologize noob question in advance.

what disproportionate scaling of image. if have image of 800x600px, want displayed 100x100px. before worked set width , height on img tag, however, 1 of properties ignored , blog entry looks lame.

help?

try setting background-size set cover, should perserve scale, cover whole area , crop areas overflow:

background-image: url('image.png'); background-repeat: no-repeat; background-size: cover; width: 100px; height: 100px; 

Comments

Popular posts from this blog

javascript - Slick Slider width recalculation -

jsf - PrimeFaces Datatable - What is f:facet actually doing? -

angular2 services - Angular 2 RC 4 Http post not firing -