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>
效果:

轉載請註明出處,本文鏈接:https://www.uj5u.com/qiye/116164.html
標籤:Html/Css
上一篇:FCC---Create a Gradual CSS Linear Gradient
下一篇:FCC---Use the CSS Transform scale Property to Change the Size of an Element
