html - 如何强制图像在同一行对齐?

标签 html css

用图说明很简单,我要的是:like Google Play, the image could be viewed in a scrolling box! 但是当我把它放入标签时得到的是这样的: My result

我的代码:

<div style="overflow: scroll; display: inline-block;">
<a class="lightview" title="image1" href="http://1.png" rel="lightbox">
<a class="lightview" title="image2" href="http://2.png" rel="lightbox">
<a class="lightview" title="image3" href="http://3.png" rel="lightbox">
</div>

最佳答案

指定文本永远不会换行:

white-space: nowrap;

Fiddle

关于html - 如何强制图像在同一行对齐?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25840333/

相关文章:

javascript - 在按下键时恢复为未悬停的 css

css - 您可以使用视频作为背景 css 吗?

html - 根据屏幕宽度设置一行产品的数量

html - 链接前需要斜杠吗?

javascript - Chrome 的 HTML5 Web 数据库在某些 Windows 配置上非常慢

javascript - http 形式的文本区域的 req.body 为空(使用 Express)

html - 固定位置 div 中的 css 元素宽度百分比?

javascript - 如何使CSS动画在容器内启动?

javascript - 在 html 中将 'onclick' 用于仅工作一次的 javascript 函数

javascript - 打开时使整个页面变暗并在关闭对话窗口时产生淡出效果