0

I have a circle shaped image I want to highlight with red, yellow or green sometimes. Can CSS be used for this?

I know I could do something like border:#CCCCCC thin solid; but I want the highlight to be the same shape as the image (circle in this case).

3
  • it definitely can be used. you can use css to create a circle of a certain color to act as a highlight. Commented Jun 30, 2013 at 4:58
  • 1
    use border-radius to make the border circular. Commented Jun 30, 2013 at 4:59
  • 1
    So by highlight, do you mean border, or overlay, or…? Commented Jun 30, 2013 at 5:05

3 Answers 3

2

Perhaps this helps:

border-radius:50%;
border:#CCCCCC thin solid;

50% border radius makes the border (and its content) round shaped.

Sign up to request clarification or add additional context in comments.

Comments

1

maybe help:

box-shadow: 0px 0px 3px blue;

OR

border-radius: 20px;

Comments

0

If your image is a gif/png with transparent background, setting the opacity will do the trick.

.highlight {
    opacity: 0.7;
}

.highlight:hover {
    opacity: 1;
}

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.