CSS里总算是有了一种简单的垂直居中布局的方法了
生活随笔
收集整理的這篇文章主要介紹了
CSS里总算是有了一种简单的垂直居中布局的方法了
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/><title>無標題文檔</title><style type="text/css">.vertical-container {height: 500px;display: -webkit-flex;display:flex;-webkit-align-items: center;align-items: center;-webkit-justify-content: center;justify-content: center;border:solid 1px red;}</style></head><body><div class="vertical-container"><div>CSS里總算是有了一種簡單的垂直居中布局的方法了!</div></div> </body> </html>
?
轉載于:https://www.cnblogs.com/guozhe/p/5995602.html
總結
以上是生活随笔為你收集整理的CSS里总算是有了一种简单的垂直居中布局的方法了的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: C语言之分支结构 if(一)
- 下一篇: 黄山风景区山顶住宿价格