Press Button Micro Animation

Press Button Micro Animation

Easy CSS Transitions & Animations 19 views
Explanation Complexity

Problem Statement

Make a button slightly shrink on active press.

Input Format

No input.

Output Format

Print the HTML+CSS code in one block.

Constraints

Use transform and transition.

Input / Output Format

Input Format
No input.
Output Format
Print the HTML+CSS code in one block.
Constraints
Use transform and transition.

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>
    .btn { background: #0b5; color: #fff; border: 0; border-radius: 12px; padding: 10px 14px; transition: transform 120ms ease; }
    .btn:active { transform: scale(0.98); }
  </style>
</head>
<body>
  <button class='btn' type='button'>Start</button>
</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>
    .btn { background: #0b5; color: #fff; border: 0; border-radius: 12px; padding: 10px 14px; transition: transform 120ms ease; }
    .btn:active { transform: scale(0.98); }
  </style>
</head>
<body>
  <button class='btn' type='button'>Start</button>
</body>
</html>
Please login to submit solutions.
Editor
Output

                                        
Please login to submit solutions.