Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="CSS 水平居中测试">
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>JS Bin</title>
</head>
<body>
  
  <h4>水平居中:</h4>
  
  <div class="box inline-x-center">
    inline-center
    <span>inline-block-center</span>
  </div>
  ß
  <div class="box">
    <div class="block-div">bock</div>
    <div class="block-div block-x-center">block-center</div>
  </div>
  
  <div class="box flex-x-center">
    inline-
    <div class="block-div">block</div>
  </div>
  
  <h4>垂直居中:</h4>
  <div class="inline-y-center mb-2">
    this is inline
  </div>
  
  <div class="box table-box">
    <p class="cell-y-middle">oooooooooooo</p>
  </div>
  
  <div class="box flex-y-center">
    <p>ooooooooooooo</p>
  </div>
  
  <div class="box relativeEle">
    <div class="block-xy-center">block-xy-center</div>
  </div>
  
  <div class="box flex-xy-center">
    <div>flex-xy-center</div>
  </div>
</body>
</html>
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
zhangyuanliangpro
0viewers