definition change of :: before :: after pseudo elements (#44188)
parent
d75e43a1e7
commit
67cac9ac42
|
@ -9,7 +9,7 @@ dashedName: create-a-more-complex-shape-using-css-and-html
|
|||
|
||||
# --description--
|
||||
|
||||
One of the most popular shapes in the world is the heart shape, and in this challenge you'll create one using pure CSS. But first, you need to understand the `::before` and `::after` pseudo-elements. These pseudo-elements are used to add something before or after a selected element. In the following example, a `::before` pseudo-element is used to add a rectangle to an element with the class `heart`:
|
||||
One of the most popular shapes in the world is the heart shape, and in this challenge you'll create one using pure CSS. But first, you need to understand the `::before` and `::after` pseudo-elements. ::before creates a pseudo-element that is the first child of the selected element; ::after creates a pseudo-element that is the last child of the selected element. In the following example, a `::before` pseudo-element is used to add a rectangle to an element with the class `heart`:
|
||||
|
||||
```css
|
||||
.heart::before {
|
||||
|
|
Loading…
Reference in New Issue