Home > Back-end >  how to case white outline on an image in css?
how to case white outline on an image in css?

Time:11-15

I have a png image of a person's head when I hover on it I want the head to get white outline about 5px I tried to use

 imgOnHover: {
 filter: 'drop-shadow(5px 5px 5px #FFF)',
 },

but it is kind of faded and it comes from one side.

CodePudding user response:

img:hover {
  border: 5px solid #FFF;
}

CodePudding user response:


img:hover {
  outline: 5px solid #FFF;
}


Hope You Helped

CodePudding user response:

filter: drop-shadow(0px 0px 0px 5px #FFF);

Unfortunately! spread-radius thus 5px are not widely supported now.See the MDN doc

  • Related