我正在试着给边界radis按钮,但它不起作用



HTML

正如您在这个html代码中看到的,我创建了一个类,并在该类中给出了锚标记。

在这里,我给了css使按钮,但我的边界半径css不能工作。

.instagram_button a {
font-weight: 500;
font-size: 20px;
line-height: 19px;
color: white;
padding: 18px 35px;
background: black;
border-radius: 30px;
text-decoration: none;
display: inline-block;
border: 2px solid transparent;
border-image: linear-gradient(to right, #6610f2, #FF6600);
border-image-slice: 1;
}
<div class="instagram_button">
<a href="#">more photos</a>
</div>

我在网上找到了这个,看起来不错。但边框不是图像,它们实际上是颜色,好的是你可以随心所欲地使用任何颜色。

我评论了你所有的边框样式,并将其发布在你的代码下,希望这将有所帮助:

.instagram_button a {
font-weight: 500;
font-size: 20px;
line-height: 19px;
color: white;
padding: 18px 35px;
background: black;
/*   border-radius: 30px; */
text-decoration: none;
display: inline-block;
/*   border: 2px solid transparent; */
/*   border-image: linear-gradient(to right, #6610f2, #FF6600); */
/*   border-image-slice: 1; */

border:3px solid #0000;
border-radius:30px;
background:
linear-gradient(black,black) padding-box,
linear-gradient(blue,red,orange,green) border-box;
}

最新更新