png 透明度作为背景标题
我有一个顶部导航标题栏,我想要大约 40% 的不透明度...
我正在查看其他线程比较 .PNG 与 css 不透明度...从我读到的内容来看,.png 可能表现更好...
所以我的问题是...
对于顶部导航标题:宽度:100%,高度:50px;
使用 1x1 像素透明图像或更像 1x50 透明图像会更好吗?
数千张 1x1 图像的加载速度是否比数百张 1x50 图像的加载速度更快?
我知道我很挑剔……
谢谢
I have a top nav header bar I want to have about 40% opacity...
I was looking at other threads comparing .PNG vs css Opacity... from what I read, the .png might perform better...
so my question is...
for a top nav header: width:100%, height:50px;
Would it be better to use a 1x1 pixel transparent image, or something more like a 1x50 transparent image?
do thousands of 1x1 images load faster then several hundred 1x50 images?
nit picky i know...
thx
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
一张图像的加载速度比数百张更大的图像快得多,但是您将浪费大量的 CPU 时间来平铺/拉伸该单个像素。
您想通过背景实现什么目标?渐变?
One single image will load much faster than many hundred larger images, but then you're going to waste an awwful lot of cpu time tiling/stretching that one single pixel.
What are you trying to achieve with the background? A gradient?