Replace Text With Background Image CSS
If you are trying to use a background image over a text. And then after the text part will be coming over a background image that means text part is not hidden.
So you can able to hide a text part from using this technique. By using text-indent property you can able to hide the text.
Here are some example of background images.
<h1>This Text will Hide</h1>
<style>
h1
{
background: url("myimage") 0 0 no-repeat;
text-indent: -9999px;
}
</style>
This will also help for making or creating a menu for a site and if you want to display the background images. #menu a{ text-indent:-20000px; display:block; height:20px; } So this above code will help you to hide a text from a menu and only images part will be displayed.
Post a Comment