designer.css 991 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. .container {
  2. display: grid;
  3. grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  4. gap: 16px;
  5. width: 90%;
  6. margin: 20px auto;
  7. }
  8. .card {
  9. border: 1px solid #ccc;
  10. padding: 20px;
  11. max-width: 200px;
  12. text-align: center;
  13. border-radius: 10px;
  14. box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  15. transition: transform 0.2s;
  16. }
  17. .card:hover {
  18. transform: scale(1.1);
  19. }
  20. .card img {
  21. border-radius: 50%;
  22. width: 100px;
  23. height: 100px;
  24. object-fit: cover;
  25. }
  26. .card .info {
  27. margin-top: 15px;
  28. overflow-x: auto; /* 允许水平滚动 */
  29. -ms-overflow-style: none; /* IE和Edge浏览器隐藏滚动条 */
  30. scrollbar-width: none; /* Firefox浏览器隐藏滚动条 */
  31. }
  32. .card .info::-webkit-scrollbar {
  33. display: none; /* Chrome, Safari和Opera浏览器隐藏滚动条 */
  34. }
  35. .card .info p {
  36. margin: 5px 0;
  37. }
  38. /* 响应式设计, 如果是手机屏幕 */
  39. @media (max-width: 768px) {
  40. .container {
  41. grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  42. }
  43. }