css - 在跨度中对齐图像下方的文本 [英] css - align text below image in a span

查看:18
本文介绍了css - 在跨度中对齐图像下方的文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在这些跨度中显示图像下方的文本,跨度不跳到新行:

I want to show text below image in these spans and spans do not jump to new line:

<span class="smileycode" id=":sm:">
    <img src="images/smiley/sm.png">:sm:
</span>&nbsp;
<span class="smileycode" id=":sq:">
    <img src="images/smiley/sq.png">:sq:
</span>&nbsp;

有什么建议吗?

推荐答案

DEMO

.smileycode{
  display:inline-block;
}
.smileycode img{
  display:block;
}

这篇关于css - 在跨度中对齐图像下方的文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆