css制作三角形
.menu {
position: fixed;
top: 15upx;
right: 10upx;
width: 150upx;
min-height: 60upx;
padding: 15upx 25upx;
display: flex;
flex-direction: column;
align-items: center;
border-radius: 10upx;
background: dimgray;
color: #fff;
}
//制作三角形
.menu::before {
border: solid transparent;
content: ' ';
height: 0;
// left: 100%; //根据三角形的位置,可以随意更改。
position: absolute;
width: 0;
border-width: 16upx;
border-bottom-color: dimgray;
top:-28upx;
right: 10px;
z-index:100;
}