How to embed picture in css by codes(not url)

User Generated

pbqre

Programming

Description

How to embed picture in css by codes(not url) ?

I know there is a way so you can code the image in the .css file (not including by url).
It's sth. like use some 8AJ2OFJ192UOASF...... thing to represent a picture...
Any ideas?

User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Explanation & Answer

hi,
you can embed the image by converting it into base64 encoding and providing it as string. something like
url(data:image/gif;base64, followed by base64 encoded string) in the css tag. Refer below urls for more info:
http://stackoverflow.com/questions/1124149/is-embedding-background-image-data-into-css-as-base64-good-or-bad-practice
http://webcodertools.com/imagetobase64converter

regards.


Anonymous
Very useful material for studying!

Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4