productList.css 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. .productCenter{
  2. display: grid;
  3. grid-template-columns: repeat(4,310px);
  4. grid-gap: 25px;
  5. box-sizing: border-box;
  6. }
  7. .product{
  8. display: block;
  9. height: 380px;
  10. background-color: #fff;
  11. box-shadow: 1px 1px 3px black;
  12. border-radius: 3px;
  13. overflow: hidden;
  14. cursor: pointer;
  15. position: relative;
  16. }
  17. .product:hover{
  18. box-shadow: 1px 1px 5px #3a3838;
  19. }
  20. .product .more{
  21. background-color: #912b02;
  22. padding: 0 30px;
  23. border-radius: 4px;
  24. display: block;
  25. position: absolute;
  26. left: 50%;
  27. transform: translate(-50%,0);
  28. top: 250px;
  29. opacity: 0;
  30. transition:all 0.5s;
  31. color: white;
  32. }
  33. .product:hover .more{
  34. opacity: 1;
  35. background-color: orangered;
  36. }
  37. .product .more:hover{
  38. box-shadow: 1px 1px 5px white;
  39. padding: 0 25px;
  40. }
  41. .product .product-info{
  42. display: block;
  43. padding: 5px;
  44. height: calc(100% - 270px);
  45. box-sizing: border-box;
  46. }
  47. .product .imgBox{
  48. display: block;
  49. width: 310px;
  50. height: 270px;
  51. }
  52. .product:hover .imgBox img{
  53. left: -10px;
  54. top: -10px;
  55. max-width: calc(100% + 20px);
  56. width: calc(100% + 20px);
  57. height: calc(100% + 20px);
  58. }
  59. .product .title{
  60. height: 40px;
  61. display: flex;
  62. align-items: center;
  63. font-size: 1.6em;
  64. }
  65. .product-info .description{
  66. display: block;
  67. height: calc(100% - 40px);
  68. border-top: 1px solid beige;
  69. font-size: 0.9em;
  70. color: #444343;
  71. }
  72. .product-info .description > span{
  73. display: block;
  74. }