写css 布局的核心态度
作者:互联网
就是要灵活, 浮动不行,就定位,定位不行,就flex 反正只要能写出来 就行了
css
.paihang{
background:#CCC;
width:100%;
}
.paihang-desc {
position: relative;
padding: 10rpx 10rpx;
width: 100%;
height: 100rpx;
line-height: 100rpx;
border: 1px solid red;
}
.fr {
position: absolute;
right: 20rpx;
top:50%;
margin-right: 20rpx;
transform: translateY(-50%);
border: 1px solid red;
border-radius: 14rpx;
padding: 10rpx;
height: 40rpx;
font-size:28rpx;
line-height: 40rpx;
}
标签:right,paihang,态度,布局,height,css,50%,border,10rpx 来源: https://blog.csdn.net/qq_15009739/article/details/112461966