[英]how to make a vertical gradient lines with css
here is my code: 这是我的代码:
<div class="pluses">
<h1>Преимущества</h1>
<p>Таким образом новая модель организационной деятельности требуют определения и уточнения систем массового участия. Идейные соображения высшего порядка, а также новая модель организационной деятельности позволяет выполнять важные задания по разработке модели развития.</p>
</div>
.pluses {
padding: 30px;
width: 250px;
float: left;
border-width: 1.5px;
border-style: solid;
border-image: linear-gradient(to top, #e2e2e2, #c2c2c2, #e2e2e2);
border-image-slice: 1;
border-bottom: none;
border-top: none;
}
here I'm trying to make a vertical lines with gradient like 在这里我正在尝试制作一条带有渐变的垂直线
but all I get is 但我得到的只是
how can I solve this problem?
我怎么解决这个问题?
You might by overwriting .pluses
class somewhere in your CSS file, but this should work 您可能会覆盖CSS文件中某处的
.pluses
类,但这应该可以工作
.pluses {
padding: 30px;
width: 250px;
float: left;
border: 1.5px solid;
border-top: 0;
border-bottom: 0;
border-image: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, rgba(226, 226, 226, 1) 48%, rgba(255, 255, 255, 0) 100%);
border-image-slice: 1;
}
Fiddle: https://jsfiddle.net/2jvqn76L/1/ 小提琴: https : //jsfiddle.net/2jvqn76L/1/
Try this: 尝试这个:
.bottom-to-top {
border-width: 3px;
border-style: solid;
-webkit-border-image:
-webkit-gradient(linear, 0 100%, 0 0, from(black), to(rgba(0, 0, 0, 0))) 1 100%;
-webkit-border-image:
-webkit-linear-gradient(bottom, black, rgba(0, 0, 0, 0)) 1 100%;
-moz-border-image:
-moz-linear-gradient(bottom, black, rgba(0, 0, 0, 0)) 1 100%;
-o-border-image:
-o-linear-gradient(bottom, black, rgba(0, 0, 0, 0)) 1 100%;
border-image:
linear-gradient(to top, black, rgba(0, 0, 0, 0)) 1 100%;
}
you can get help from here: https://css-tricks.com/examples/GradientBorder/ 您可以从这里获得帮助: https : //css-tricks.com/examples/GradientBorder/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.