From the course: CSS Shorts

Unlock this course with a free trial

Join today to access over 22,500 courses taught by industry experts.

Multiple background images

Multiple background images - CSS Tutorial

From the course: CSS Shorts

Multiple background images

- Hi, this is Chris Converse and in this episode we'll apply two images to the same HTML element as background images allowing us to create a more complex layout with less HTML. So if you'd like to follow along, download the exercise files and let's begin by opening the HTML file in a text editor. And so once you have the HTML file open you'll see inside of the body area, we have a single article element. Inside of the article element, we have a heading and a paragraph. So what we're going to be doing is adding multiple background images into the body element. So to do that, let's go back to the exercise files and let's open up style.css in our text editor. And now in the CSS file, let's find the rule that targets the body element, right here. We can see the background color that's being defined. So let's come in and remove that background color and let's add some values so we can bring in the bee graphic and set the repeat and sizing properties. So first we'll set URL. So type URL…

Contents