--- id: 612ec19d5268da7074941f84 title: Step 32 challengeType: 0 dashedName: step-32 --- # --description-- Gli operatori logici possono essere usati per costruire media query più complesse. L'operatore logico `and` è usato per stabilire due condizioni media. Ad esempio, ecco una media query che fa riferimento a una larghezza del display tra 500px e 1000px: ```css @media (min-width: 500px) and (max-width: 1000px){ } ``` Aggiungi un'altra regola `@media` da applicare se la finestra del browser è più grande di `769px` ma più piccola di `1199px`. # --hints-- Dovresti aggiungere una nuova `@media` query. ```js assert(new __helpers.CSSHelp(document).getCSSRules('media')?.length === 2); ``` La `@media` query dovrebbe avere una `min-width` di `769px` e una `max-width` di `1199px`. ```js const mediaText = new __helpers.CSSHelp(document).getCSSRules('media')[1]?.media?.mediaText; assert(mediaText === '(max-width: 1199px) and (min-width: 769px)' || mediaText === '(min-width: 769px) and (max-width: 1199px)'); ``` # --seed-- ## --seed-contents-- ```html Piano
``` ```css html { box-sizing: border-box; } *, *::before, *::after { box-sizing: inherit; } #piano { background-color: #00471b; width: 992px; height: 290px; margin: 80px auto; padding: 90px 20px 0 20px; position: relative; border-radius: 10px; } .keys { background-color: #040404; width: 949px; height: 180px; padding-left: 2px; overflow: hidden; } .key { background-color: #ffffff; position: relative; width: 41px; height: 175px; margin: 2px; float: left; border-radius: 0 0 3px 3px; } .key.black--key::after { background-color: #1d1e22; content: ""; position: absolute; left: -18px; width: 32px; height: 100px; border-radius: 0 0 3px 3px; } .logo { width: 200px; position: absolute; top: 23px; } @media (max-width: 768px) { #piano { width: 358px; } .keys { width: 318px; } .logo { width: 150px; } } --fcc-editable-region-- --fcc-editable-region-- ```