首页 > 其他 > 详细

Create Texture by Adding a Subtle Pattern as a Background Image

时间:2019-10-22 21:24:48      阅读:85      评论:0      收藏:0      [点我收藏+]

One way to add texture and interest to a background and have it stand out more is to add a subtle pattern.

The key is balance, as you don‘t want the background to stand out too much, and take away from the foreground.

The 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.

 

练习题目:

Using the url of https://cdn-media-1.freecodecamp.org/imgr/MJAkxbh.png, set the background of the whole page with the body selector.

 

练习代码:

<style>
  body {
    background: url(https://cdn-media-1.freecodecamp.org/imgr/MJAkxbh.png);
  }
</style>

 

效果:

技术分享图片

 

Create Texture by Adding a Subtle Pattern as a Background Image

原文:https://www.cnblogs.com/jane-panyiyun/p/11722392.html

(1)
(1)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!