---
id: 587d78a5367417b2b2512ad8
title: Create Texture by Adding a Subtle Pattern as a Background Image
challengeType: 0
videoUrl: ''
localeTitle: 通过添加细微图案作为背景图像来创建纹理
---
## Description
为背景添加纹理和兴趣并让它更突出的一种方法是添加一种微妙的图案。关键是平衡,因为你不希望背景太突出,并从前景中拿走。 background
属性支持url()
函数,以便链接到所选纹理或图案的图像。链接地址用括号内的引号括起来。
## Instructions
使用https://i.imgur.com/MJAkxbh.png
的网址,使用body
选择器设置整个页面的background
。
## Tests
```yml
tests:
- text: 您的body
元素应该将background
属性设置为具有给定链接的url()
。
testString: 'assert(code.match(/background:\s*?url\(\s*("|"|)https:\/\/i\.imgur\.com\/MJAkxbh\.png\1\s*\)/gi), "Your body
element should have a background
property set to a url()
with the given link.");'
```
## Challenge Seed
## Solution
```js
// solution required
```