本文介绍了改变梯度hr的线性值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 我有一个CSS code,它修改&LT;小时/&GT; 来渐变类型,I have a CSS code that change the <hr/> to gradient type ,<hr class="style-one" /> ...... .....hr.style-one{border: 0;height: 1px;background-image: -webkit-linear-gradient(left, rgba(0,0,0,0), rgba(0,0,0,0.75), rgba(0,0,0,0));background-image: -moz-linear-gradient(left, rgba(0,0,0,0), rgba(0,0,0,0.75), rgba(0,0,0,0));background-image: -ms-linear-gradient(left, rgba(0,0,0,0), rgba(0,0,0,0.75), rgba(0,0,0,0));background-image: -o-linear-gradient(left, rgba(0,0,0,0), rgba(0,0,0,0.75), rgba(0,0,0,0));}但风格生成(白 - 黑 - 白)渐变,您可以检查它这里:)我怎样才能改变这种梯度(黑 - 白)But the style generate ( white - black -white ) gradient , you can check it Here :)How can I change this gradient to ( black - white ) ?推荐答案更改您的CSS hr.style-one{ border: 0; height: 1px; background-image: -webkit-linear-gradient(left, rgba(0,0,0,0.75), rgba(0,0,0,0.75), rgba(0,0,0,0)); background-image: -moz-linear-gradient(left, rgba(0,0,0,0.75), rgba(0,0,0,0.75), rgba(0,0,0,0)); background-image: -ms-linear-gradient(left, rgba(0,0,0,0.75), rgba(0,0,0,0.75), rgba(0,0,0,0)); background-image: -o-linear-gradient(left, rgba(0,0,0,0.75), rgba(0,0,0,0.75), rgba(0,0,0,0));}请按照 FIDDLE 这篇关于改变梯度hr的线性值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 10-16 05:19