Reputation: 61
Can any one help me how to remove blue color from image on selection you can see screenshot from here...
Upvotes: 3
Views: 7773
Reputation: 15860
Use
::selection {
color: #e2e2e2;
background-color: #999;
}
Note: This only changes the font properites. Not the images.
However if you want to remove some background from image its Impossible with CSS. CSS is meant to edit the HTML style not the images. For that use Adobe Photoshop!
I am seriously not able to understand, why do you want to change the background of the image.
Ok there can be a solution. You create an image with transparent background! And change its background. A little more elaboration please.
Edit: You can use this for image background. But the div background will be changed. Use
background-color: none;
or
background-color: transparent;
This will not select the image. Not change the background to blue!
Upvotes: 3
Reputation: 59779
You can use the user-select
property (though pressing CTRL + A will still cause the blue selection background to appear as @WebDesignerRDj pointed out):
img {
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
Upvotes: 7