這樣的下三角氣泡框用純css3如何實現
問題描述
這樣的下三角氣泡框用純css3如何實現,如圖
問題解答
回答1:樓上2位的畫出來的三角形好像都是純背景色的三角形!這種虛線型的三角形好像真不好畫?。。∪绻皇且曈X上的這種效果,小面一個小的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;
}
回答2:可以考慮用clip-path
回答3:用Border畫就行
p:after{ content:’’;border:20px solid transparent;border-top-color:#fff;position:absolute;left:50%;margin-left:-20px;width:0;}回答4:
利用微元素: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;…(自己精確一下定位樣式之類的,手機打的可能中英文標點符號混用,見諒)
}
回答5:利用偽類就好了
相關文章:
1. css3選擇器nth-of-type的問題2. docker - dcoker gitlab 如何修改主機地址?3. Html 入門教程視頻無法播放4. PHP單例模式5. css3 - css 選擇器如何同時使用屬性選擇和順序選擇?6. objective-c - 微信支付的問題7. angular.js - 請教一個關于angularjs的小問題8. javascript - 微信jssdk ios下自定義onMenuShareAppMessage 分享失效,Android分享成功9. angular.js - angularjs的自定義過濾器如何給文字加顏色?10. android - 百度地圖加載完成監聽
