Good day. There is a task - to create a block on the background of the gradient (see screenshot, on the left). The dynamic number of elements are located radially on the border of the circle. Hovering over an element is a hover effect. What I coped with (see screenshot, right).
The problem is as follows: the boundary of the circle should be "interrupted" near the icon, the icon should overlap the entire border. How to do it?
I tried to shaman with transparent borders and a background at the icons - it did not work out.
<ul class='advantages-circle'> <li class="advantages-circle__element"> <img src='//i.imgur.com/y6KYdvS.png' alt=""> </li> <li class="advantages-circle__element"> <img src='//i.imgur.com/y6KYdvS.png' alt=""> </li> <li class="advantages-circle__element"> <img src='//i.imgur.com/y6KYdvS.png' alt=""> </li> <li class="advantages-circle__element"> <img src='//i.imgur.com/y6KYdvS.png' alt=""> </li> <li class="advantages-circle__element"> <img src='//i.imgur.com/y6KYdvS.png' alt=""> </li> <li class="advantages-circle__element"> <img src='//i.imgur.com/y6KYdvS.png' alt=""> </li> <li class="advantages-circle__element"> <img src='//i.imgur.com/y6KYdvS.png' alt=""> </li> </ul> body { background: rgb(59, 67, 113); background: -moz-linear-gradient(top, rgba(59, 67, 113, 0.9) 0%, rgba(243, 144, 79, 0.9) 99%); background: -webkit-linear-gradient(top, rgba(59, 67, 113, 0.9) 0%, rgba(243, 144, 79, 0.9) 99%); background: linear-gradient(to bottom, rgba(59, 67, 113, 1) 0%, rgba(243, 144, 79, 1) 99%); filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#3b4371', endColorstr='#f3904f', GradientType=0); background-attachment: fixed; } @mixin distribute-on-circle( $nb-items, $circle-size, $item-size) { $half-item: ($item-size / 2); $half-parent: ($circle-size / 2); position: relative; width: $circle-size; height: $circle-size; padding: 0; border-radius: 50%; list-style: none; box-sizing: content-box; > * { display: block; position: absolute; top: 50%; left: 50%; width: $item-size; height: $item-size; margin: -$half-item; } $angle: (360 / $nb-items); $rot: 0; @for $i from 1 through $nb-items { >:nth-of-type(#{$i}) { transform: rotate($rot * 1deg) translate($half-parent) rotate($rot * -1deg); } $rot: ($rot + $angle); } } .advantages { h2 { text-align: center; } &-circle { @include distribute-on-circle(8, 30em, 6em); margin: 5em auto 0; border: 2px solid white; &__element { img { display: block; width: 100%; } } } } 