1.5 KiB
1.5 KiB
id | title | challengeType | videoUrl |
---|---|---|---|
587d78a5367417b2b2512ad8 | Create Texture by Adding a Subtle Pattern as a Background Image | 0 | https://scrimba.com/c/cQdwJC8 |
Description
background
property supports the url()
function in order to link to an image of the chosen texture or pattern. The link address is wrapped in quotes inside the parentheses.
Instructions
https://i.imgur.com/MJAkxbh.png
, set the background
of the whole page with the body
selector.
Tests
tests:
- text: Your <code>body</code> element should have a <code>background</code> property set to a <code>url()</code> with the given link.
testString: assert(code.match(/background:\s*?url\(\s*("|'|)https:\/\/i\.imgur\.com\/MJAkxbh\.png\1\s*\)/gi), 'Your <code>body</code> element should have a <code>background</code> property set to a <code>url()</code> with the given link.');
Challenge Seed
<style>
body {
}
</style>
Solution
var code = "body {background: url('https://i.imgur.com/MJAkxbh.png')}"