我有一个div,它使用线性渐变作为边框图像,为它提供一些渐变边框
<div class = "gradborders" id="mydiv" runat="server">
..various elements...
</div>
....
....
.gradborders{
border-image: -webkit-linear-gradient(45deg, rgba(20,20,20,0.7) 5%, rgba(90,90,90,0.5) 35%, rgba(255,255,255,0.2) 100%) 8 stretch;
border-image: -o-linear-gradient(45deg, rgba(20,20,20,0.7) 5%, rgba(90,90,90,0.5) 35%, rgba(255,255,255,0.2) 100%) 8 stretch;
border-image: -moz-linear-gradient(45deg, rgba(20,20,20,0.7) 5%, rgba(90,90,90,0.5) 35%, rgba(255,255,255,0.2) 100%) 8 stretch;
border-image: linear-gradient(45deg, rgba(20,20,20,0.7) 5%, rgba(90,90,90,0.5) 35%, rgba(255,255,255,0.2) 100%) 8 stretch;}
我希望角落圆润。我通过将其添加到gradborders来尝试标准方式:
border-radius: 8px;
-webkit-border-radius: 8px;
-moz-border-radius: 8px;
但没有骰子。我甚至尝试在div上使用AJAX Rounded Corner扩展器,我确信它可以工作但是也没有用。任何想法??
答案 0 :(得分:1)
也许这样的JSFiddle会做:
<div class="container">
<div class="gradborders">hi</div>
</div>
和
.container{border-radius: 10px;overflow:hidden;}
.gradborders{
-webkit-border-image: url("http://photos-f.ak.fbcdn.net/hphotos-ak-ash4/1686_520555094669668_1347475803_n.jpg") 8;}