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.
PNG ファイルを base-64 でエンコードして、スタイルシートの data:url に含めたいと考えています。どうやってやるの?
私は Mac を使用しているので、Unix コマンド ラインの何かがうまく機能します。Python ベースのソリューションも素晴らしいでしょう。
これはPythonでそれを行う必要があります:
import base64 encoded = base64.b64encode(open("filename.png", "rb").read())