Creating responsive triangles with CSS

前端 未结 3 582
一个人的身影
一个人的身影 2020-12-15 00:12

I was trying to create triangles in CSS for a responsive site today and couldn\'t find a good example on stackoverflow, so here\'s how I did it.

3条回答
  •  既然无缘
    2020-12-15 00:43

    You could achieve the same using simple CSS

    To make it responsive use it in media queries..

    Try the following JsFiddle

    http://jsfiddle.net/arunberti/52grj/

    .triangle {
        width: 0;
        height: 0;
        border-top: 50px solid rgba(255%, 204%, 0%, 1);
        border-right: 100px solid transparent;
    }
    

提交回复
热议问题