css中怎么实现图片后面的文字居中

日期:2016-11-12 19:09:11 人气:1

css中怎么实现图片后面的文字居中

这种情况推荐, 大概就是这样的 .divImg { position: relative; width: 200px; height: 200px; } .divText { position: absolute; top: 50%; margin-top: -10px; /* height的一半*/ width: 100px; height: 20px; }
    A+
热门评论