title: How can I use a data attribute to set a background-image in CSS?
body: <p>I have a folder with a few background images (one.jpg, two.jpg, three.jpg) , and this markup</p>
  
  <pre><code>&lt;section class="slide" data-bg="one"&gt;&lt;/section&gt;
  &lt;section class="slide" data-bg="two"&gt;&lt;/section&gt;
  &lt;section class="slide" data-bg="three"&gt;&lt;/section&gt;
  </code></pre>
  
  <p>Would it be possible somehow <strong>just with CSS</strong> to do something like this?</p>
  
  <pre><code>.slide{
      background-image: url(img/attr(data-bg).jpg);
  }
  </code></pre>
  
  <p>This code isnt working, of course.</p>