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

java - unable show chart in xls document using jasper reports -

java.lang.RuntimeException: Could not generate dummy secret at sun.security.ssl.RSAClientKeyExchange.<init> -

javascript - How to change image src on success AJAX -