Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>JS Bin</title>
</head>
<body>
  <div class="parent">
    <span class="child">
      内联元素是在表格里面,这时可以利用inline元素的CSS属性vertical-align,默认是baseline属性,将其设置为middle
    </span>
  </div>
</body>
</html>
 
.parent {
  border: 1px solid red;
  height: 200px;
  display: table;
}
.child {
  display: table-cell;
  vertical-align: middle;
}
Output

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

Dismiss x
public
Bin info
anonymouspro
0viewers