css-sprites

Can I add color to bootstrap icons only using CSS?

会有一股神秘感。 提交于 2019-11-26 21:33:27
Twitter's bootstrap uses Icons by Glyphicons . They are " available in dark gray and white " by default: Is it possible to use some CSS trickery to change the colors of the icons? I was hoping for some other css3 brilliance that would prevent having to have an icon image set for each color. I know you can change the background color of the enclosing ( <i> ) element, but I'm talking about the icon foreground color. I guess it would be possible to inverse the transparency on the icon image and then set the background color. So, can I add color to bootstrap icons only using CSS? hajpoj Yes, if

Clip/Crop background-image with CSS

让人想犯罪 __ 提交于 2019-11-26 20:04:26
问题 I have this HTML: <div id="graphic">lorem ipsum</div> with this CSS: #graphic { background-image: url(image.jpg); width: 200px; height: 100px;} The background image I'm applying is 200x100 px, but I only want to display a cropped portion of the background image of 200x50 px. background-clip does not appear to be the right CSS property for this. What can I use instead? background-position should not be used, because I'm using the above CSS in a sprite context where the image part I want to

Best Way to Sprite Images?

喜你入骨 提交于 2019-11-26 16:56:09
问题 I am now getting to the point that I want to sprite the images on www.trailbehind.com. Most of the images are loaded by JavaScript functions, and I have lots of little images such as the map icons. Is there any software that supports this? I know that you can use Django-sprites if your images are in Django templates. And you can use GWT similarly, if you want to write some Java code. What's the best way to go about this for a website that is Python/Django with a Javascript front-end? I never

CSS Sprites and repeating backgrounds

情到浓时终转凉″ 提交于 2019-11-26 16:44:39
问题 I'd like to keep all my small images in one sprite file, for example: Now suppose I want to add a thin background image which is meant to repeat-x over 100% the width of an element: Does this have to be stored as a seperate entity, or can I somehow store it in the sprite image? I can't work out if it's possible to do a background-repeat over a section of a sprite, I think not but I'm fairly sure I've seen it done somewhere. 回答1: I’m not sure if this is in CSS3 already, but the Gecko engine

How can I scale an image in a CSS sprite

爱⌒轻易说出口 提交于 2019-11-26 14:13:39
In this article, http://css-tricks.com/css-sprites/ , it talks about how can I crop off a smaller image from 1 bigger image. Can you please tell me if it is possible/how I can crop off a smaller image and then scale the cropped off region before I lay it out? Here is an example from that article: A { background-image: url(http://www.jaredhirsch.com/coolrunnings/public_images/3deb155981/spriteme1.png); background-position: -10px -56px; } I would like to know how can I scale that image after I crop it from from spriteme1.png Here is the URL of the example: http://css-tricks.com/examples/CSS

Tools to make CSS sprites? [closed]

我是研究僧i 提交于 2019-11-26 10:05:09
问题 Are there any good tools to make css sprites? IDEALLY I\'d want to give it a directory of images and an existing .css file that refers to those images and have it create a big image optimized with all the little images AND change my .css file to refer to those images. At the least I\'d want it to take a directory of images and generate a big sprite and the .css necessary to use each as a background. Are there any good photoshop plugins or fully blown apps to do this? 回答1: This will do 90% of

Can I add color to bootstrap icons only using CSS?

自闭症网瘾萝莉.ら 提交于 2019-11-26 07:58:13
问题 Twitter\'s bootstrap uses Icons by Glyphicons. They are \" available in dark gray and white \" by default: Is it possible to use some CSS trickery to change the colors of the icons? I was hoping for some other css3 brilliance that would prevent having to have an icon image set for each color. I know you can change the background color of the enclosing ( <i> ) element, but I\'m talking about the icon foreground color. I guess it would be possible to inverse the transparency on the icon image

How can I scale an image in a CSS sprite

泪湿孤枕 提交于 2019-11-26 05:55:33
问题 In this article, http://css-tricks.com/css-sprites/, it talks about how can I crop off a smaller image from 1 bigger image. Can you please tell me if it is possible/how I can crop off a smaller image and then scale the cropped off region before I lay it out? Here is an example from that article: A { background-image: url(http://www.jaredhirsch.com/coolrunnings/public_images/3deb155981/spriteme1.png); background-position: -10px -56px; } I would like to know how can I scale that image after I

Smallest data URI image possible for a transparent image

大兔子大兔子 提交于 2019-11-26 04:59:37
问题 I\'m using a transparent 1x1 image with a background image, to be able to use sprites and still provide alternative text for some icons. I want to use a data URI for the image to reduce the number of HTTP requests, but what would be the smallest possible string to produce a transparent image ? I realize I could use data URI:s for the actual images instead of sprites, but it\'s easier to maintain when everything is kept in the CSS instead of scattered around. 回答1: After playing around with