freeCodeCamp/curriculum/challenges/italian/14-responsive-web-design-22/learn-css-animation-by-buil.../6140d10d50636e14695013b2.md

86 lines
1.8 KiB
Markdown

---
id: 6140d10d50636e14695013b2
title: Step 9
challengeType: 0
dashedName: step-9
---
# --description--
Crea un selettore per selezionare il tuo secondo elemento `.line`. Imposta la proprietà `transform` a `rotate(60deg)`.
Ricorda che la proprietà `transform` ti permette di manipolare la forma di un elemento. In questo caso, utilizzando il valore `rotate(60deg)` ruoterà l'elemento attorno al suo punto `transform-origin` di 60 gradi in senso orario.
# --hints--
Dovresti creare un selettore `.line:nth-of-type(2)`.
```js
assert(new __helpers.CSSHelp(document).getStyle('.line:nth-of-type(2)'));
```
Il selettore `.line:nth-of-type(2)` dovrebbe avere una proprietà `transform` con valore di `rotate(60deg)`.
```js
assert(new __helpers.CSSHelp(document).getStyle('.line:nth-of-type(2)')?.transform === 'rotate(60deg)');
```
# --seed--
## --seed-contents--
```html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Ferris Wheel</title>
<link rel="stylesheet" href="./styles.css">
</head>
<body>
<div class="wheel">
<span class="line"></span>
<span class="line"></span>
<span class="line"></span>
<span class="line"></span>
<span class="line"></span>
<span class="line"></span>
<div class="cabin"></div>
<div class="cabin"></div>
<div class="cabin"></div>
<div class="cabin"></div>
<div class="cabin"></div>
<div class="cabin"></div>
</div>
</body>
</html>
```
```css
.wheel {
border: 2px solid black;
border-radius: 50%;
margin-left: 50px;
position: absolute;
height: 55vw;
width: 55vw;
max-width: 500px;
max-height: 500px;
}
.line {
background-color: black;
width: 50%;
height: 2px;
position: absolute;
top: 50%;
left: 50%;
transform-origin: 0% 0%;
}
--fcc-editable-region--
--fcc-editable-region--
```