制作半透明 PNG 或在非透明 PNG 上设置不透明度/alpha 过滤器是否更有效?
相关图像将在网站的每个页面上重复使用大约 5 次。我可以将不透明度设置为 0.5,将 alpha(不透明度)设置为 50,也可以在 Photoshop 中降低图像的不透明度并使用该设置保存。
有更好的做法可以遵循吗?
The image in question will be reused about 5 times on each page of a website. I can either set the opacity to 0.5 and alpha(opacity) to 50 or I can lower the opacity of the image in Photoshop and save it with that setting.
Is there a better practice to follow?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
![扫码二维码加入Web技术交流群](/public/img/jiaqun_03.jpg)
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果图像在任何使用的地方都具有相同的不透明度,我不明白为什么您需要在使用它的任何地方添加一堆具有相同值的
opacity
声明。在 Photoshop 中降低不透明度,保存一次,然后在任何地方使用。如果您稍后需要更改图像的不透明度,只需打开 PSD,在那里进行更改,然后再次保存,更改就会自动反映,而无需再次更改所有
opacity
样式。If the image is going to have the same opacity wherever it's used, I don't see why you should need to add a bunch of
opacity
declarations with the same values everywhere you use it.Lower the opacity in Photoshop, save it once, and use it everywhere. In case you need to change the image's opacity later, you can simply open the PSD, change it there, save it once more and the change will be reflected automatically without you having to change all the
opacity
styles again.检查链接问题的第五个答案。
Check the 5th answer of linked question.