我正在尝试使用边框图像为我的边框设置渐变颜色。但是什么时候使用border-image: linear-gradient(-180deg, #2D6BD0 0%, #83B8FF 100%); 我的 DIV 的每个角落只有一个点……有人知道为什么这没有显示整个边框吗?
.slider {
width: 90%;
min-height: 15vw;
background: white;
position: relative;
float: left;
display: block;
border-style: solid;
border-width: 0.3vw;
border-image: linear-gradient(-180deg, #2D6BD0 0%, #83B8FF 100%);
margin-left: 5%;
margin-bottom: 2.5%;
margin-top: -27.5%;
border-radius: 8px;
box-shadow: 2px 2px 4px 0px #000000;
z-index: 20;
}
.insideslider {
width: 80%;
margin-left: 2.5%;
float: left;
position: relative;
}
.slides {
position: relative;
float: left;
display: inline;
width: 30%;
margin-left: 3%;
margin-top: 3.5%;
}
#slide1 {
margin-left: 1.5%;
}
#slide2 {}
#slide3 {}
.leftarrow {
margin-top: 5vw;
width: 5%;
float: left;
position: relative;
margin-left: 2.5%;
}
.rightarrow {
margin-top: 5vw;
width: 5%;
float: left;
position: relative;
margin-left: 2.5%;
transform: rotate(180deg);
}
<div class="slider">
<img class="leftarrow" src="images/rewind.png" />
<div class="insideslider">
<img class="slides" id="slide1" src="images/aandrijvingen.png" />
<img class="slides" id="slide2" src="images/electronicrepair.png" />
<img class="slides" id="slide3" src="images/retrofit.png" />
</div>
<img class="rightarrow" src="images/rewind.png" />
</div>