搜尋

首頁  >  問答  >  主體

这样的下三角气泡框用纯css3如何实现

这样的下三角气泡框用纯css3如何实现,如图

黄舟黄舟2873 天前716

全部回覆(5)我來回復

  • 巴扎黑

    巴扎黑2017-04-17 11:55:40

    樓上2位的畫出來的三角形好像都是純背景色的三角形!
    這種虛線型的三角形好像真不好畫! ! !
    如果只是視覺上的這種效果,小面一個小的p有2個虛線邊框在旋轉45度絕對定位到那個大的虛線p上即可如:
    .d1{

    position: relative;
    border: 1px dashed #999;
    background: #fff;
    width: 150px;
    height: 100px;

    }
    .d1 span{

    display: block;
    width: 20px;
    height: 20px;
    position: absolute;
    border-right:1px dashed #999;
    border-bottom:1px dashed #999;
    transform: rotate(45deg);
    bottom: -10px;
    left: 50%;
    margin-left:-15px;
    background: #fff;
    z-index: 99;

    }

    回覆
    0
  • 迷茫

    迷茫2017-04-17 11:55:40

    可以考慮用clip-path

    回覆
    0
  • ringa_lee

    ringa_lee2017-04-17 11:55:40

    用Border畫就行

    p:after
    {
     content:'';
    border:20px solid transparent;
    border-top-color:#fff;
    position:absolute;
    left:50%;
    margin-left:-20px;
    width:0;
    }

    回覆
    0
  • PHP中文网

    PHP中文网2017-04-17 11:55:40

    利用微元素:after{
    content:'';
    with:0;
    height:0;
    boreder-left:20px dotted transparent;
    border-right:20px dotted transparent;
    border-bottom:40px dotted #ddd;
    position:absolute;
    bottom:0;

    (自己精確一下定位樣式之類的,手機打的可能中英文標點符號混用,見諒)

    回覆
    0
  • 阿神

    阿神2017-04-17 11:55:40

    利用偽類就好了

    回覆
    0
  • 取消回覆