css - 如何将背景图像放在内容的右侧

标签 css background-image sprite css-position

我无法让背景图片显示在某些文本的右侧。

参见页面 http://bit.ly/1FR0Tw3

“右箭头”背景图片 Sprite 需要位于单词“Next”的右侧。

上一个链接的图像背景的 sprite 很好。只是我想不通的下一个链接。

这是我的 CSS

div#maincontentcontainer div#inner-page-content div.entry-content div.post-nav-previous {
    background: url('/wp-content/themes/investorcom-2015/images/post-nav-arrows.png') no-repeat left top;
    background-position: 0 0;
    float: left;
    font-size: 0.8em;
    line-height: 1.4em;
    padding-left: 20px;
}
div#maincontentcontainer div#inner-page-content div.entry-content div.post-nav-next {
    background: url('/wp-content/themes/investorcom-2015/images/post-nav-arrows.png') no-repeat right top;
    background-position: 0 -15px;
    float: right;
    font-size: 0.8em;
    padding-right: 20px;
}

最佳答案

background-position: right -15px;

像这样?

关于css - 如何将背景图像放在内容的右侧,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31163939/

相关文章:

javascript - 悬停时自动滚动图像高于容器

css - 网站在 iPhone 上未显示全长

html - 将列表项包裹在 anchor 中是否合理?

javascript - 如何清除移动 SVG 线留下的痕迹?

javascript - 使用 Javascript、Canvas 和 Alpha 检测进行碰撞检测

html - 滚动条可见,但不起作用

css - @font-face 在其他计算机上不工作 - 具有正确的文件链接

assembly - NES(6502组装) Sprite 机芯

css - 如何让 Ember.js 绑定(bind) Attr 刷新?

css - 大背景图片的css放在哪里?