Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Make images larger in HTML with no blur

Tags:

html

image

I have been messing around with some new ideas in Javascript, but I'm not very good at making extremely detailed images in Paint, Paint.NET, etc. The problem is when I have a 64 * 64 image or an 8 * 8 and I want it to display 640 * 640 or 16 * 16; the images get blurry. I've seen many other forums and things were people ask this question or a similar one, but I'm relatively new to this and don't want to make the image larger in photoshop or whatever. On a similar note, can I display only part of an image at one time but have a larger image than shown, so that I don't have to make multiple images of the same thing?

like image 253
Ren Avatar asked Oct 24 '25 04:10

Ren


1 Answers

Maybe this CSS attribute on your img helps:

image-rendering: pixelated;

I found it in this blog post: https://css-tricks.com/keep-pixelated-images-pixelated-as-they-scale/

like image 120
thetrutz Avatar answered Oct 25 '25 17:10

thetrutz



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!