css怎么做这个弹出框?右下角有一个尖尖应该怎么搞出来?
弹出框是点击按时间出来的
<view class="comment ">
<view style="margin-left: 20px;">评论<span>{{thumbs}}</span></view>
<view style="margin-right: 20px;">按时间</view>
</view>
这种尖角是通过定位搞上去的,请看我这篇博文:
https://blog.csdn.net/qq_57421630/article/details/122887438?spm=1001.2014.3001.5502
可以写一个尖尖的这种形状的div,然后通过position定位到那个位置。
给盒子comment加个伪类 写个三角形样式,定位到合适位置,代码示例如下
.comment{
position: relative; // comment需要相对定位
&::before {
content: '';
position: absolute;
bottom: -20px;
left: 190px;
width: 0;
height: 0;
border: 10px solid;
border-color: rgba(53, 67, 108, 0.8) transparent transparent transparent;
}
}