@media (max-width: 100px) { /* CSS Rules */ }
and the following media query returns the content when the device's height is more than or equal to 350px:
@media (min-height: 350px) { /* CSS Rules */ }
Remember, the CSS inside the media query is applied only if the media type matches that of the device being used.
p
tag has a font-size
of 10px when the device's height is less than or equal to 800px.
p
element should have the font-size
of 10px when the device height
is less than or equal to 800px.
testString: assert($('p').css('font-size') == '10px', 'Your p
element should have the font-size
of 10px when the device height
is less than or equal to 800px.');
- text: Declare a @media
query for devices with a height
less than or equal to 800px.
testString: assert(code.match(/@media\s*?\(\s*?max-height\s*?:\s*?800px\s*?\)/g), 'Declare a @media
query for devices with a height
less than or equal to 800px.');
```
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus quis tempus massa. Aenean erat nisl, gravida vel vestibulum cursus, interdum sit amet lectus. Sed sit amet quam nibh. Suspendisse quis tincidunt nulla. In hac habitasse platea dictumst. Ut sit amet pretium nisl. Vivamus vel mi sem. Aenean sit amet consectetur sem. Suspendisse pretium, purus et gravida consequat, nunc ligula ultricies diam, at aliquet velit libero a dui.
```