这也是我从其他地方看到的,记录存档一下
style里面:
.center-in-center{ position: absolute; top: 50%; left: 50%; -webkit-transform: translate(-50%, -50%); -moz-transform: translate(-50%, -50%); -ms-transform: translate(-50%, -50%); -o-transform: translate(-50%, -50%); transform: translate(-50%, -50%); }
div框中:
<div class="center-in-center"> <a href="gllogin.html"> <div style="width:300px;height:40px;border-radius:30px;border:5px solid #ffffff;text-align: center;padding:10px;"> <p>·我是管理员·</p></div> </a> <p> </p> <a href="login.html"> <div style="width:300px;height:40px;border-radius:30px;border:5px solid #ffffff;text-align: center;padding:10px;"> <p>·我是用户·</p></div> </a> </div>标签:总结,center,4.17,50%,transform,今日,translate From: https://www.cnblogs.com/yangkaiwen/p/17359996.html