图像调整大小为背景 [英] image resizing for background
问题描述
我有一个更大尺寸的图像,我想用它作为背景。
我想重复这个图像的想法CSS。目前图像尺寸为
32x32。当我重复通过背景风格课程时,我会在预期的区域内获得4次。我想在后台有8个实例。为此,我想将图像调整为16x16并将其用作背景。
背景图像样式没有尺寸属性。谁能建议我应该如何动态实现这一目标?否则我没有任何选择,除了通过图像编辑器调整实际图像的大小。
谢谢
Vijay
Hi,
I have a bigger sized image which I want to use for background.
I want to repeat this image thought css. At present the image size is
32x32. When I repeat through background style class, I get it 4 times in the intended area. I want to have 8 instances of it in the background. To do that I want to resize the image as 16x16 and use it for background.
Background-image style does not have size attributes. Can anyone suggest how should I achieve this dynamically ? Otherwise I dont have any option other than resizing the actual image though an image editor.
Thanks
Vijay
推荐答案
你可以使用CSS3background-size属性,或者你可以假装它:http://webdesign.about.com/od/css3/f/blfaqbgsize.htm
You can use the CSS3 "background-size" property, or you can fake it: http://webdesign.about.com/od/css3/f/blfaqbgsize.htm
的尺寸更大我想用于背景的图像。
我想重复这个想象css的图像。目前图像尺寸为
32x32。当我重复通过背景风格课程时,我会在预期的区域内获得4次。我想在后台有8个实例。为此,我想将图像调整为16x16并将其用作背景。
背景图像样式没有尺寸属性。谁能建议我应该如何动态实现这一目标?否则,除了通过图像编辑器
have a bigger sized image which I want to use for background.
I want to repeat this image thought css. At present the image size is
32x32. When I repeat through background style class, I get it 4 times in the intended area. I want to have 8 instances of it in the background. To do that I want to resize the image as 16x16 and use it for background.
Background-image style does not have size attributes. Can anyone suggest how should I achieve this dynamically ? Otherwise I dont have any option other than resizing the actual image though an image editor
这篇关于图像调整大小为背景的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!