072-styled-controls.html 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>072 author-styled form controls</title>
  6. <style>
  7. body { background: #ffffff; color: #202020; font-family: sans-serif;
  8. margin: 12px; font-size: 14px; }
  9. .pane { float: left; width: 330px; margin-right: 20px; }
  10. /* A: real controls styled like google.com's search page */
  11. .A input[type="submit"] { background-color: #e8eaed; border: 1px solid #e8eaed;
  12. border-radius: 8px; color: #3c4043; padding: 0 16px; height: 36px;
  13. margin: 11px 4px; font-size: 14px; }
  14. .A .box, .B .box { border: 1px solid #9aa0a6; border-radius: 22px;
  15. height: 44px; background: #ffffff; }
  16. .A textarea { width: 100%; background-color: transparent; border: none;
  17. padding: 0; margin: 0; resize: none; font-size: 16px; }
  18. /* B: the same look built from plain boxes */
  19. .B .btn { display: inline-block; background: #e8eaed; border: 1px solid #e8eaed;
  20. border-radius: 8px; color: #3c4043; padding: 9px 16px;
  21. margin: 11px 4px; }
  22. /* Only for forced-colors (high contrast): must not apply here. */
  23. @media (forced-colors: active) { .A input[type="submit"] { border: 3px solid #ff0000; } }
  24. </style>
  25. </head>
  26. <body>
  27. <h1>072 &mdash; author-styled controls</h1>
  28. <p>A control with author background/border/radius is painted with that
  29. style (not the dark UI theme); a transparent borderless textarea is
  30. invisible inside its rounded box. A and B must look alike.</p>
  31. <div class="pane A">
  32. <div class="box"><textarea rows="1"></textarea></div>
  33. <center><input type="submit" value="Search"><input type="submit" value="Lucky"></center>
  34. </div>
  35. <div class="pane B">
  36. <div class="box"></div>
  37. <center><span class="btn">Search</span><span class="btn">Lucky</span></center>
  38. </div>
  39. </body>
  40. </html>