Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
所以我正在尝试使用base64编码的png在我的CSS中使用图标。我使用http://www.motobit.com/util/base64-decoder-encoder.asp来转换它们。然而,pngs 只有一个 8bit 的 alpha 通道,像素要么完全不透明,要么完全透明,没有部分透明。这使我的图标边缘硬朗。通过 base64_encode 可以实现 24 位 alpha 通道的任何想法?
该页面中的编码器可能有问题。我在 Photoshop 中制作了一个带有 alpha 通道的 PNG,使用 PHP 对其进行编码base64_encode(),将其放入图像中,它就可以工作了。看看这个HTML 的小提琴和 CSS 的这个小提琴。
base64_encode()