html :css
div.parent div.child
css :html
.parent height 736px line-height @height
html :web
div.parent div.child
css : flex
.parent display table .child display table-cell vertical-align middle
html :code
div.parent div.child
css :orm
.parent position relative .child position absolute top 50% height 736px margin-top -(@height / 2)
html :htm
div.parent div.child
css : it
.parent position relative .child position absolute top 0 bottom 0 margin auto
html : io
div.parent div.child
css : table
.parent padding 5% 0 .child padding 10% 0
html :
div.parent div.floater div.child
css :
html, body height 100% .parent height @height .floater float left height @height / 2 width @height margin-bottom -50px .child clear both height 100px
要求display inline-block
html :
div.parent div.child
css :
.parent:before content '' display inline-block height 100% vertical-align middle .child display inline-block vertical-align middle
html :
div.parent div.child
css :
.parent height 100% position relative .child position absolute top @height / 2 transform translateY(-50%)
html :
div.parent div.chlid
css :
.parent display -webkit-box -webkit-box-align center
html :
div.parent div.child
css :
.parent display flex align-items center