Create a bell shape with CSS

前端 未结 3 1920
被撕碎了的回忆
被撕碎了的回忆 2021-02-04 15:19

I am playing with shapes in css and want to make a traditional bell shape (think Christmas bell). Here\'s the general shape that I\'m going for (though I really don\'t care abo

3条回答
  •  逝去的感伤
    2021-02-04 16:20

    I tryed to help you, with your way (Yes, It's hard!) and that the best I got:

    http://jsfiddle.net/NeBtU/1/

    #bell { 
        left:100px;
        position: relative;
    }
    #bell:before, #bell:after {
        position: absolute;
        content: "";
        left: 50px; top: 0;
        width: 320px;
        height:400px;
        background: #d3d3d3;
        border-radius: 150px 150px 150px 20px;
        -webkit-transform: rotate(15deg);
        -webkit-transform-origin: 0 0;
    }
    #bell:after { 
        left: 0; 
        -webkit-transform: rotate(-15deg); 
        -webkit-transform-origin:100% 0;
        border-radius: 150px 150px 20px 150px;
    
        line-height:740px;
        content:"\25CF";
        color:#d3d3d3;
        font-size:200pt;
    }
    

提交回复
热议问题