我无法让背景图片显示在某些文本的右侧。
“右箭头”背景图片 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/