CSS3实现渐变边框

div{
  width:200px;
  height:200px;
  background-clip:padding-box,border-box;
    background-origin:padding-box,border-box;
    background-image:linear-gradient(135deg,#fff,#fff),
      linear-gradient(135deg,blue,#fff,#fff,blue);
    border:10px transparent solid;
  border-radius:5px
}
效果图

你可能感兴趣的:(CSS3实现渐变边框)