我成功使用了背景位置:底部顶部100px将图像移动到顶部,但我没有成功将图像向右移动.
是否有类似于背景位置的东西:底部顶部100px,右侧900px可能有助于产生所需的结果?
#AddNewMeetingbutton { position: absolute; top: 0; text-align: center; background-image: url(Images/add_icon_48x48.png); background-position: bottom top 100px,right 800px; background-repeat: no-repeat; height: 190px; wIDth: 915px; background-color: transparent; outline: none; border: none; z-index: 2;}解决方法 像这样的东西
background-image: url(http://i.stack.imgur.com/cW9aK.png);background-repeat: no-repeat;background-size: 48px 48px;background-position: right 10px top 10px;
JSfiddle Demo
MDN Reference
background-position:<position>
where:
<position>
is one to four values representing a 2D position regarding the edges of the element’s Box. relative or absolute offsets can be given. Note that the position can be set outsIDe of the element’s Box.
所以:
background-position: right 10px top 10px;
将图像置于顶部/右侧,但距离右边缘10px,距顶边缘10px
总结以上是内存溢出为你收集整理的html – CSS背景位置右上角全部内容,希望文章能够帮你解决html – CSS背景位置右上角所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)