我可以应用webkit渐变到边框或只是背景吗? [英] Can I apply webkit-gradient to a border or just background?
本文介绍了我可以应用webkit渐变到边框或只是背景吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
所以我想让边框褪色。我有我想要的确切的webkit梯度设置。
但不知道如何实现它在边框元素。
有可能吗?
Btw,我试过下面的CSS,它didn工作:
border-color:-webkit-gradient(linear,left bottom,left top,color-stop ,rgb(214,11,11)),色停(0.39,rgb(175,13,13)),色停(0.07,rgb(157,22,22)));
border-style:solid;
border-width:10px;
解决方案是的,您可以应用 -webkit-gradient
到边框:
-webkit-border-image:-webkit-gradient (线性,左上,左下,从(#00abeb)到(#fff),停止(0.5,#fff),停止(0.5,#66cc00)
请参阅Webkit.org上关于的博客文章-webkit-gradient
So I would like to make the border faded. I have the exact webkit-gradient settings that I want.
But not sure how to implement it on the border element.
Is it possible? How do I do that?
Only CSS3 please.
Btw, I tried the following CSS and it didn't work:
border-color: -webkit-gradient( linear, left bottom, left top, color-stop(0.74, rgb(214,11,11)), color-stop(0.39, rgb(175,13,13)), color-stop(0.07, rgb(157,22,22)));
border-style: solid;
border-width: 10px;
解决方案 Yes, you can apply -webkit-gradient
to a border:
-webkit-border-image: -webkit-gradient(linear, left top, left bottom, from(#00abeb), to(#fff), color-stop(0.5, #fff), color-stop(0.5, #66cc00)) 21 30 30 21 repeat repeat;
(from this example on webkit.org)
See the blog post on Webkit.org about -webkit-gradient
这篇关于我可以应用webkit渐变到边框或只是背景吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文