How to create dynamic diagonal line from left-bottom to right-top corner?

前端 未结 3 795
别那么骄傲
别那么骄傲 2021-02-04 16:17

I\'ve created a simple layout where I have three divs which interact. One is the logo in the middle of the screen and the other are two blocks which with jQuery are moved out of

3条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-02-04 16:50

    You don't have to do too much for this. See demo here

    HTML

    CSS

    .diagonal {
        width: 0; 
        height: 0; 
        border-top: 110px solid transparent;
        border-right:110px solid blue; 
    }
    

提交回复
热议问题