.aaa { width:400px; height:50px; font-size:24px; font-family:'楷体'; box-sizing:border-box; border:3px solid transparent; background-clip:padding-box,border-box; background-origin:padding-box,border-box; background-image:linear-gradient(90deg,#fff,#fff),linear-gradient(90deg,#000,red); }