Is it possible to make a gradient border?

前端 未结 12 1110
陌清茗
陌清茗 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:51

    Just use ::before

    .card::before{
               content: '';
              width: 100%;
              position: absolute;
              height: 5px;
              top:0;
              left: 0;
              border-radius:5px 5px 0 0;
    
              background-color: hsl(195, 100%, 50%);
        }  
    

提交回复
热议问题