From the course: CSS Shorts

Unlock this course with a free trial

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

Add perspective to an element

Add perspective to an element - CSS Tutorial

From the course: CSS Shorts

Add perspective to an element

- [Chris] Hi this is Chris Converse, and in this episode we're going to add some perspective to our sidebar just to add a little visual interest to our layout. 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 up in the head area you'll see a link to style.css. We'll be opening this in a moment. And if we scroll down inside of the HTML, what I've done here is I have an H1 at the top and then I have a main element. And inside of the main element is an article element and an aside. So these are laid out in columns using CSS flex properties. So what we're gonna do first is we're gonna add an additional element inside of the aside so that we can skew and rotate that particular element. We don't want to rotate the aside again because it is part of the flex element that is flexing against the article element. So inside of the aside let's come in here and let's add a div. Next I'll…

Contents