absolute 水平垂直居中
时间:2021-02-03 10:41:48
收藏:0
阅读:0
1、例如(登录/注册):
header 引入 bootstrap :
<link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css"> <script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script> <script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
css:
right: 0; bottom: 0;position: absolute;top: 50%;left: 50%;transform: translate(-50%,-50%);
评论(0)