小惡魔 - AppleBOY
  • Youtube 頻道
  • 線上課程
    Go 語言基礎實戰 Docker 容器開發實戰 一天學會 DevOps 自動化流程
  • 歷年文章
  • Search
小惡魔 - AppleBOY

Search 小惡魔 - AppleBOY

Inline-Block


CSS 垂直置中解法

 Posted on July 4, 2013  |  1 minutes  |  178 words  |  appleboy

相信大家在 Google 可以找到很多解法,這幾天在 Facebook 發現更精彩的解決方式,就是用 CSS:before 跟 inline-block,底下提供範例:

html 程式碼

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
  <div class="ot">
    <div class="wrapper"></div>
  </div> 
</body>
</html>
[Read More]
CSS  inline-block 

Appleboy  • © 2025  •  小惡魔 - AppleBOY

Hugo v0.130.0 powered  •  Theme Beautiful Hugo adapted from Beautiful Jekyll