零宽度不间断空间 [英] Zero-width non-breaking space

查看:148
本文介绍了零宽度不间断空间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一块文字,最后我要插入两个图标。

I have a piece of text and at the end I want to insert two icons.

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim 
veniam, quis nostrud exercitation ullamco laboris <img ...><img ...>

我想保持两个图像连接,如果一个图像溢出两个应该去新行,所以我需要的是像& nbsp; 但宽度为零的东西。

I want to keep the two images joined and if an image overflows both should go to the new line, so what I need is something like a &nbsp; but with zero width.

是否有html实体

推荐答案

尝试使用css属性在一个span中打包图像 white-space:nowrap;

Try to wrap the images in a span with css property white-space: nowrap;:

<span style="white-space: nowrap;"><img ...><img ...></span>

这篇关于零宽度不间断空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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