search

Home  >  Q&A  >  body text

html5 - CSS3边框渐变、彩色问题求指教

如上图所示想实现这种彩色边框,听人说CSS3能实现,麻烦有做过的给个简单demo、O(∩_∩)O谢谢

PHP中文网PHP中文网2785 days ago1018

reply all(3)I'll reply

  • 阿神

    阿神2017-04-17 15:09:00

    The first parameter is the borderoffset inward, and the second parameter is border width

    border-image: -webkit-linear-gradient( red, blue, yellow, black, white, green) 1 1;

    If it’s just two sides, this will do. If it’s up, down, left, right, , add a rotate. If it’s all, just add another one and then rotate and make the border transparent
    Or just solve it with a picture.

    reply
    0
  • 巴扎黑

    巴扎黑2017-04-17 15:09:00

    I won’t write a demo for you. Baidu css3 linear-gradient linear gradient.

    reply
    0
  • 阿神

    阿神2017-04-17 15:09:00

    It seems that the border can only be simulated through the background, or the border background image

    reply
    0
  • Cancelreply