How to create a ribbon shape in CSS

前端 未结 8 842
旧时难觅i
旧时难觅i 2021-01-05 15:00

http://jsfiddle.net/6HyjZ/

.bookmarkRibbon{
     width:0; 
     height:100px; 
     border-right:50px solid blue;
     border-left:50px solid blue;
     bord         


        
8条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-05 15:21

    Use the rotate css transform:

     .bookmarkRibbon{
          width:0; 
          height:100px; 
          border-right:50px solid blue;
          border-left:50px solid blue;
          border-bottom:30px solid transparent;
         -webkit-transform: rotate(90deg);
         -ms-transform: rotate(90deg);
         transform: rotate(90deg);
     }
    

    http://jsfiddle.net/6HyjZ/13/

提交回复
热议问题