Gradient borders

后端 未结 17 1728
一个人的身影
一个人的身影 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条回答
  •  闹比i
    闹比i (楼主)
    2020-11-22 04:16

    Try the below example:

    .border-gradient {
          border-width: 5px 5px 5px 5px;
          border-image: linear-gradient(45deg, rgba(100,57,242,1) 0%, rgba(242,55,55,1) 100%);
          border-image-slice: 9;
          border-style: solid;
    }
    

提交回复
热议问题