text-align与block水平标签absolute元素实例页面

代码:

CSS代码:
.test { 
    height: 190px;
    text-align: center;
    background-color: #f0f3f9;
}
.abs {
    position: absolute;
}
                
HTML代码:
<div class="test">
    <div class="abs"><img src="//image.zhangxinxu.com/image/study/s/s256/mm1.jpg" /></div>
</div>
                

效果: