I am trying to use both css content and an image (base64), but when I load the page it loads like a broken link image.
Now I use a website to upload a base64 image, and this is the css that I use that gives me broken images:
.default:after{ content: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxNi4wLjQsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+'); position:absolute; width:100px; height:100px; }
if I open the βbrokenβ base 64 image on a new chrome tab, this will be the result of the error:
This page contains the following errors:
an error in line 10 in column 1: additional content at the end of the document The following is the rendering of the page before the first error.
Now, I have never used base64 images, but do I need to do something special, or just copy and paste the autogenerated code?
in advance for help
** PS: I am developing in localhost, I do not know if this could be the reason or not.
css base64 svg
Nick
source share