渐变边框 [英] Gradient borders
本文介绍了渐变边框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试为边框应用渐变,我认为这样做很简单:
I'm trying to apply a gradient to a border, I thought it was as simple as doing this:
border-color: -moz-linear-gradient(top, #555555, #111111);
但这不起作用.
有人知道做边界渐变的正确方法是什么吗?
Does anyone know what is the correct way to do border gradients?
推荐答案
WebKit现在(至少Chrome 12)支持渐变作为边框图像:
WebKit now (and Chrome 12 at least) supports gradients as border image:
-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;
Prooflink- http://www.webkit.org/blog/1424/css3-gradients/
浏览器支持: http://caniuse.com/#search=border-image
Prooflink -- http://www.webkit.org/blog/1424/css3-gradients/
Browser support: http://caniuse.com/#search=border-image
这篇关于渐变边框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文