Sunday, December 02, 2018

Using a File on Your PC as the Background Image in CSS

This one's hard to find online for some reason

body {
         background-image : url("C:\path\to\file");
}

Seems right intuitively, except, it doesn't work. What does work? "file:///C:/path/to/image"

How should you know? Open the file in your browser first - and pay attention :)

No comments: