常用技巧
时间:2021-09-04 04:12:19
收藏:0
阅读:22
文字缩进
文章首段落的空格
text-indent: 2em;
隐藏方法
1.transform: rotateY(90deg);
2.opcity:0;
3.display:none
4.z-index:-1
vertical-align设置元素的垂直对齐方式。
把元素的顶端与行中最高元素的顶端对齐:
vertical-align:top
重叠
1.子绝父相(父盒子设置相对定位(可选),子盒子设置绝对定位(必须))
2.z-index值越大排序越靠前
元素等比例缩放
1.图片父盒子设置弹性布局垂直居中,设置宽100%,高;图片设置max-width:100%;
- 父盒子
img_f{
display: flex;
justify-content: center;
align-items: center;
}
- 图片
img{
max-width:100%;
}
2.scole缩放
transform: scale();
原文:https://www.cnblogs.com/mywifeisMsHu/p/15221319.html
评论(0)