Blogger Information
Blog 19
fans 0
comment 0
visits 10678
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
电脑端自适应布局
无名小辈
Original
497 people have browsed it
  1. html{
  2. font-size: 100px;
  3. }
  4. button{
  5. background-color: aqua;
  6. color: rgb(42, 19, 107);
  7. border: 0;
  8. outline: 0;
  9. font-size: 0.2rem;
  10. width: 0.6rem;
  11. height: 0.3rem;
  12. border-radius: 0.1rem;
  13. box-shadow: 2px 2px 2px #321232;
  14. }
  15. button:hover{
  16. cursor: pointer;
  17. opacity: 0.8;
  18. transition: 0.4s;
  19. color: rgb(218, 169, 255);
  20. background-color: rgb(2, 9, 15);
  21. }
  22. h2{
  23. font-size: 0.5rem;
  24. padding: 0;
  25. margin: 0;
  26. }
  27. /* img < 300 */
  28. @media (max-width:300){
  29. img {
  30. width: 300px;
  31. }
  32. }
  33. /* 301 < img < 500 */
  34. @media (min-width:301px) and (max-width:500px) {
  35. img {
  36. width: 400px;
  37. }
  38. }
  39. /* 501 < img < 900 */
  40. @media (min-width:501px) and (max-width:900px) {
  41. img {
  42. width: 450px;
  43. }
  44. }
  45. /* 901 < img < 1024 */
  46. @media (min-width:901px) and (max-width:1024px) {
  47. img {
  48. width: 500px;
  49. }
  50. }
  1. <body>
  2. <h2>电脑端自适应布局</h2>
  3. <button>but1</button>
  4. <button>but2</button>
  5. <button>but3</button>
  6. <div>
  7. <img src="1.png" alt="">
  8. </div>
  9. </body>
Correcting teacher:PHPzPHPz

Correction status:qualified

Teacher's comments:
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post