search

Home  >  Q&A  >  body text

css3 - 如何用css画出一个宽度占满屏幕,高度固定的三角形?

如何用css画出一个宽度占满屏幕,高度固定的三角形?

比如:

在上面那个容器宽度不固定的情况下也可以与上面的容器等宽。

PHPzPHPz2782 days ago650

reply all(1)I'll reply

  • PHPz

    PHPz2017-04-17 11:28:48

    It seems that it is not easy to implement using border. Finally, gradients and pseudo elements are used to achieve the above effect. I just don’t know what browser version you want to be compatible with.

    For specific code, please refer to: http://codepen.io/yuezk/pen/xwQweW

    reply
    0
  • Cancelreply