I need to know how to get the background image to not be blurry when text is over it in CSS as it spoils the look of my website if it's blurry.
My CSS is:
background: #ff0000 url(img/rain.jpg) top center repeat-y;
background-size: 100%;
But when I load it up where there is text that line goes blurry and I don't want it to so how do I do this?
Fiddle example
From the drop-down menu beneath the image selection options, change the settings and examine your desktop as they are applied: often, a blurry wallpaper is the result of the menu being set to "Fit" or "Stretch," and adjusting it to "Fill" or "Center" can solve the problem immediately.
This can happen if the picture file does not match the size of your screen. For example, many home computer monitors are set at a size of 1280x1024 pixels (the number of dots that make up the image). If you use a picture file smaller than this, it will be blurry when it is stretched out to fit the screen.
use of background-size: cover;background-position:50% 50%; will help you..
Try to add:
image-rendering: -webkit-optimize-contrast;
Try adding this to the code: image-rendering: pixelated;
For me it worked perfectly.
you can also try - image-rendering: -webkit-optimize-contrast;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With