Click here to Skip to main content
15,883,901 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have concentric circle (circle within circle) & i have to color area between two circle with two diffrent colors. Half of it should have a diffrent color.

What I have tried:

.outer-circle-smallest {

background-color: #75a3a3;
width:70px; /* You can define it by % also */
height:70px; /* You can define it by % also*/
position:relative;
text-align:center;
border-radius: 50%;
background-clip:content-box;
padding:5px;
box-shadow: inset 10px 24px 40px 0px #75a3a3,
inset -10px -24px 40px 0px #75a3a3,
inset 20px -10px 40px 0px #75a3a3,
inset -20px 10px 40px 0px #75a3a3;
}
.inner-1 {
background-color:#f2f2f2;
top: 10%; left:10%; /* of the container */
width:80%; /* of the outer-1 */
height:80%; /* of the outer-1 */
position: absolute;
border-radius: 50%;
text-align:center;
border:1px solid #f2f2f2
}
Posted
Updated 18-Mar-16 13:29pm

1 solution

You cannot color the area between circles in this approach. Therefore, color all circles fully. Put smaller circle of different color on top of the bigger circle in Z-order. It will create an effect of colored ring, the area between the rounded shapes. Add more rings in the same way, it you need them.

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900