Aligning css arrow boxes

前端 未结 6 1922
深忆病人
深忆病人 2021-01-29 02:08

My question is similar to this question: Arrow Box with CSS But instead of only 1 box I need to align several boxes. And still be able to see the arrow on all boxes.

In

6条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-29 02:39

    try this

    http://jsfiddle.net/casperskovgaard/LHHzt/1/

    .arrow {
        width: 128px;
        height: 100px;
        background-color: #f0f0f0;
        border: 1px solid #999;
        position: relative;
    }
    .arrow:after {
        content: '';
        position: absolute;
        top: 0px;
        left: 128px;
        width: 0;
        height: 0;
        border: 50px solid transparent;
        border-left: 12px solid #f0f0f0;
    }
    .arrow:before {
        content: '';
        position: absolute;
        top: 0px;
        left: 129px;
        width: 0;
        height: 0;
        border: 50px solid transparent;
        border-left: 12px solid #999;
    }
    

提交回复
热议问题