可以将背景图像否定地放置在底部或右侧,还是仅重复显示图片的一部分? [英] can a background image be negatively positioned to the bottom or right, or only a portion of a picture repeated?

查看:55
本文介绍了可以将背景图像否定地放置在底部或右侧,还是仅重复显示图片的一部分?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在整理一个精灵,有两个问题。

I'm putting together a sprite and have two questions.

某些事情我一直在想,是否有可能将背景图片设置在右侧或底部。否定位置是元素或顶部左侧的面包和黄油,但右侧和底部呢?

Something I've always wondered whether possible is negatively positioning a background picture to the right or bottom. A negative position is bread and butter stuff on the left of an element or top but what about the right and bottom?

如果我有500px x 500px div,那我可以了吗?放置背景图片的左边缘以使用负值(大于495px)将其从右侧出现5像素以将其推入?

If I have a 500px by 500px div can I then position the left edge of a background image to appear 5px in from the right using a negative value rahter than 495px to push it over?

第二个问题是我是否可以使用

The second question is whether I can use just a small portion of an image and repeat it without the rest of the image showing.

例如,我可能有一个精灵,像素为300像素见方,并充满了各种东西。

For example, I may have a sprite thats 300px square and filled with all kinds of things. Is it possible to take a 50px square portion of that image and repeat it in the background of an element?

我非常怀疑是否有可能,但必须将猴子放到

I very much doubt either is possible but must put the monkey to sleep!

推荐答案

第一个问题,不可以。

对于第二个问题,不,你不能。

For your second question, no you cannot.

这篇关于可以将背景图像否定地放置在底部或右侧,还是仅重复显示图片的一部分?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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