Is it possible to make a gradient border?

前端 未结 12 1112
陌清茗
陌清茗 2020-12-16 16:54

As the title states, is it possible to make a gradient border in CSS3 and if so how? I know that you can make gradient backgrounds and there are many generators for that, bu

12条回答
  •  清歌不尽
    2020-12-16 17:37

    here is an example of a gradient border that would work under Firefox:

    #gradbor {
        border: 8px solid #000;
        -moz-border-bottom-colors: #555 #666 #777 #888 #999 #aaa #bbb #ccc;
        -moz-border-top-colors: #555 #666 #777 #888 #999 #aaa #bbb #ccc;
        -moz-border-left-colors: #555 #666 #777 #888 #999 #aaa #bbb #ccc;
        -moz-border-right-colors: #555 #666 #777 #888 #999 #aaa #bbb #ccc;
        padding: 5px 5px 5px 15px;
    }
    

    Try something like that in your CSS for it to work.

    EDIT: I'm not sure if it will work at all on other browsers.

提交回复
热议问题