Orientation Layout Change

Orientation Layout Change

Hard CSS Responsive Design 25 views
Explanation Complexity

Problem Statement

Switch layout when phone is in landscape orientation.

Input Format

No input.

Output Format

Print the HTML+CSS code in one block.

Constraints

Use @media (orientation: landscape).

Input / Output Format

Input Format
No input.
Output Format
Print the HTML+CSS code in one block.
Constraints
Use @media (orientation: landscape).

Examples

Input:
Output:
(HTML+CSS code)

Example Solution (Public)

CSS
<!doctype html>
<html lang='en'>
<head>
  <meta charset='utf-8'>
  <meta name='viewport' content='width=device-width, initial-scale=1'>
  <title>meetcode</title>
  <style>
    .box { padding: 16px; border: 1px solid #eee; border-radius: 14px; }
    @media (orientation: landscape) {
      .box { background: #eafaf1; }
    }
  </style>
</head>
<body>
  <div class='box'>Rotate screen to see the change on meetcode.</div>
</body>
</html>

Official Solution Code

<!doctype html>
<html lang='en'>
<head>
  <meta charset='utf-8'>
  <meta name='viewport' content='width=device-width, initial-scale=1'>
  <title>meetcode</title>
  <style>
    .box { padding: 16px; border: 1px solid #eee; border-radius: 14px; }
    @media (orientation: landscape) {
      .box { background: #eafaf1; }
    }
  </style>
</head>
<body>
  <div class='box'>Rotate screen to see the change on meetcode.</div>
</body>
</html>
Please login to submit solutions.
Editor
Output

                                        
Please login to submit solutions.