Gradient borders

后端 未结 17 1425
一个人的身影
一个人的身影 2020-11-22 03:40

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);
         


        
17条回答
  •  抹茶落季
    2020-11-22 04:33

    Try this, works fine on web-kit

    .border { 
        width: 400px;
        padding: 20px;
        border-top: 10px solid #FFFF00;
        border-bottom:10px solid #FF0000;
        background-image: 
            linear-gradient(#FFFF00, #FF0000),
            linear-gradient(#FFFF00, #FF0000)
        ;
        background-size:10px 100%;
        background-position:0 0, 100% 0;
        background-repeat:no-repeat;
    }
    Hello!

提交回复
热议问题