宽度固定,高度不固定的div垂直水平居中
用 flexbox 的特性:
<div class="parent">
<div class="child"></div>
</div>
.parent {
display: flex;
width: 100%;
height: 300px;
background: #cecece;
align-items: center; /* 垂直居中 */
justify-content: center; /* 水平居中 */
}
.child {
background: #000;
width: 10%;
height: 10%;
}
原文链接:https://segmentfault.com/q/1010000005898631
The subversion command line tools are no longer provided by Xcode. 银联支付,tp5.1银联支付 支付宝即时到账,PHP支付宝 system libzip must be upgraded to version >= 0.11 CMake 3.0.2 or higher is required Class 'ZipArchive' not found chr() expects parameter 1 to be int php7.4 tcpdf unexpected '=' syntax error phpspreadsheet 微信支付安全控件 微信支付安全 微信支付控件 mac微信支付证书 Invalid cell coordinate [1 thinkphp导出 状态码是500有返回值 session_start(): open(/var/lib/php/session nginx权限