css-sprites

Border-radius bleeding

牧云@^-^@ 提交于 2019-11-30 07:57:57
问题 I want to give border-radius to a <nav> in which all the <a> have an image has background, but the image keeps going outside the border-radius. Why is that? 回答1: To fix this in all browsers you should use: -moz-background-clip: padding; -webkit-background-clip: padding-box; background-clip: padding-box; I found the answer here 回答2: Add: -webkit-background-clip: padding-box; To fix this in Webkit. 回答3: I had a problem with a bootstrap panel border or background bleeding to a HTML header <h>

Is css-sprite a good technique? [closed]

久未见 提交于 2019-11-30 06:59:23
is css-sprite good technique? I read about its pros at http://spriteme.org/ and have also I seen a lot of questions about css sprites here in stackoverflow. What are its cons? Will it work in all browsers as claimed in their site? Yes, it is a good technique. You can reduce the number of HTTP requests and it is a page optimization technique. The first rule in Best Practices for Speeding Websites by Yahoo is Minimize HTTP Requests 80% of the end-user response time is spent on the front-end. Most of this time is tied up in downloading all the components in the page: images, stylesheets, scripts,

CSS - using one background image with multiple images on it

Deadly 提交于 2019-11-30 05:15:59
I've observed that often the websites use only one background image which contains multiple images on it. For example, instead of using separately icons, all of the icons are put on one image and then the different parts of image are used in different section. Is there any advantage to this? How can this be used? For example, for the following Stack Overflow sprite, how would I display just one of the images? The technique is called CSS Sprites . Basically you use CSS's background-position property and fixed height or width for your element. If your elemnts are fixed width and fixed height at

Maximum image dimensions in a browser/CSS spec?

痞子三分冷 提交于 2019-11-30 04:52:16
I want to display a page containing about 6000 tiny image thumbnails (40x40 each). To avoid having to make 6000 HTTP requests, I am exploring CSS sprites, i.e. concatenating all these thumbnails into one long strip and using CSS to crop the required images out. Unfortunately, I have discovered that JPEG files cannot be larger than 65500 pixels in any one dimension. Wary of further limits in the web stack, I am wondering: are any of the following unable to cope with an image with dimensions of 40x240000? Internet Explorer Opera WebKit Any CSS spec Any HTML spec The PNG spec Edit: the purpose of

Why not animated GIF instead of animated CSS sprites?

ぐ巨炮叔叔 提交于 2019-11-30 03:01:58
In recent trends I've seen people animating CSS sprites using JavaScript instead of using animated GIFs? Ex: http://www.google.com/doodles/eadweard-j-muybridges-182nd-birthday (in fact, Google used this technique in other Doodles too) https://everyme.com/ ('me' logo) and many more... Is that all just to show or experiment with technology or are there any benefits out of it. I m interested in knowing the benefits, if there. The reason I m asking is that I couldn't figure out as in both cases we need to generate the intermediate frames (mostly using tweening technique). Control You have no

Single image file to store all the little images on a page

允我心安 提交于 2019-11-30 02:24:20
In one of the recent Stackoverflow podcasts , Jeff talked about having a single image file having all of those tiny images that are all over a page and then cutting it with CSS so that all the images get displayed correctly. The whole point is to reduce the number of server requests so that the page gets loaded faster. I was like "wow, that's really cool, I could really use this in our product". My question is: How is this done with CSS? I need to load the images with background-image, but then how do I specify the offset of the sub-image in the large image? That is, suppose that there is a

How to concatenate icons into a single image with ImageMagick?

做~自己de王妃 提交于 2019-11-29 20:53:54
I want to use CSS sprites on a web site instead of separate image files, for a large collection of small icons that are all the same size. How can I concatenate (tile) them into one big image using ImageMagick ? davr From the page you linked, 'montage' is the tool you want. It'll take a bunch of images and concatenate/tile them into a single output. Here's an example image I've made before using the tool: (source: davr.org ) Simon Ernst convert works much better than montage. It arranges images vertically or horizontally and keeps png transparency. convert *.png -append sprites.png (append

Compass: generate Sprites, plus width / height on each images in the sprite

天大地大妈咪最大 提交于 2019-11-29 20:17:58
I'm using Compass (a CSS Framework) to generate sprite images. It work, but compass generate only a background-position for each image. Is it possible to get also the width and the height for each image in the sprite? This is my code: @import "ico/*.png"; @include all-ico-sprites; The generated code: .ico-sprite, .ico-bag-blue, .ico-bag-black { background: url('../images/ico-s78b1a1919b.png') no-repeat; } .ico-bag-blue { background-position: 0 0; } .ico-bag-black { background-position: 0 -24px; } And the code i would like to have: .ico-sprite, .ico-bag-blue, .ico-bag-black { background: url('.

Looking for a good Image Sprite generator tool [closed]

你。 提交于 2019-11-29 20:08:17
I looking for a decent Image sprite generator. I tried http://spritegen.website-performance.org/ but it's not "smart" enough to handle multiple image dimensions and merge them with few blank spaces between images. Any suggestions??? ZeroSprites is a CSS sprites generator aimed at area minimization using VLSI floorplaning algorithms. It can generate tighter sprites sheet than Sprite Generator and Spritemapper . Oisin Lavery I have used them all and Sprite Cow is by far the best. Update: There's a really cool new tool called SpritePad . It's an even better solution. I use csssprites.com . Its

css sprite with negative background positions not clear

﹥>﹥吖頭↗ 提交于 2019-11-29 15:15:00
I am working on some existing code where they are using css sprites. There is big image and its been used for to display all the images. Its basically a Ul and li elements. The each li element uses this image and uses a background position. I understood the css sprites completly ,its for better performance. But only thing which is not clear is why the x and y positions start with negative margins. Most of the images in the sprites are getting retrived by using something like -540px -30px like this I was watching that image on the browser and it shows up correcetly and they should with 0,0