card.html 940 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <!-- 卡片区域 -->
  2. <div class="card-grid">
  3. <div class="card orange"></div>
  4. <div class="card"></div>
  5. <div class="card"></div>
  6. <div class="card"></div>
  7. </div>
  8. <style>
  9. .card-gird{
  10. display:flex;
  11. flex-direction: row;
  12. flex-wrap: wrap;
  13. justify-content: center;
  14. align-items: center;
  15. height: 400px;
  16. .card{
  17. width:40%;
  18. height:100px;
  19. min-height: 100px;
  20. }
  21. .orange{
  22. background: linear-gradient(57deg,#CB6A50 0%,#D99B2E 100%);
  23. }
  24. }
  25. .profile {
  26. ion-card {
  27. margin-bottom: 20px;
  28. .profile-info {
  29. display: flex;
  30. align-items: center;
  31. .avatar {
  32. margin-right: 10px;
  33. }
  34. .details {
  35. flex: 1;
  36. }
  37. }
  38. }
  39. }
  40. .small-card {
  41. width: 90%; /* 设置卡片宽度为页面宽度的80% */
  42. margin: 0 auto; /* 水平居中显示 */
  43. margin-top: 20px; /* 设置上边距为20像素 */
  44. }
  45. </style>