body{
display: flex;
justify-content: center;
align-items: center;
}
div{
width: 260px;
height: 400px;
border: 1px solid gray;
overflow: hidden;
}
span{//内容显示在正中间 第七版
display: flex;
justify-content: center;
align-items: center;//第七版的所占长宽
height: 50px;
width: 200px;
text-align: center;//开始位置
position: relative;
top: 400px;
left: -100px;
background-color: red;//以矩形的右下角为起点开始旋转 也可以选择左上角(left top)
transform-origin: right bottom;
transform: rotate(45deg);
}
web 如何设置倒三角标签
最新推荐文章于 2024-07-04 16:37:43 发布