I’m trying to make an instagram clone site, it’s time for the story part, but when I make the border of my picture linear-gradient, the border-radius feature does not work. please help me to fix this problem
.story-card img {
width: 65px;
height: 65px;
border-radius: 360%;
}
.story-card {
border: 2px solid;
border-image-slice: 1;
border-image-source: linear-gradient(to bottom, #405de6, #5851db, #833ab4, #c13584, #e1306c, #fd1d1d);
}
<div class="main-container">
<section class="story">
<div class="story-card">
<img src="img/fb.jpg" alt="">
</div>
</section>
</div>
I tried;
border-radius : 50%;
2
Answers
your
.story-card img
rule createsborder-radius
for only inner image.just add
border-radius: 360%;
to.story-card
Tip: if you use
border-radius
with percentage value, it can’t be more than 100%. it’s better to make it100%
You can use a solution with mask (from here)