ASCII码 ASCII码

css-grid布局实战-选做作业

发布于:2022-03-29 11:32:48  栏目:技术文档

练习

  1. body {
  2. margin: 40px;
  3. }
  4. .title{
  5. margin: 30px 130px;
  6. }
  7. .box {
  8. height: 235px;
  9. }
  10. .box .content {
  11. display: grid;
  12. background-color: #ffffff;
  13. border-radius: 5px;
  14. }
  15. .box .content .bottom {
  16. display: flex;
  17. flex-direction: column;
  18. place-items: center;
  19. padding: 20px 5px;
  20. gap: 30px;
  21. }
  22. .box .content .bottom .up span{
  23. font-size: 13px;
  24. background-color: rgb(156, 155, 155);
  25. padding: 0 4px;
  26. border-radius: 2px;
  27. color: white;
  28. }
  29. .box .content .bottom .up h5{
  30. padding-left: 5px;
  31. }
  32. .box .content .bottom .up h5:hover{
  33. color: red;
  34. cursor: pointer;
  35. }
  36. .box .content .bottom .down{
  37. font-size: 12px;
  38. color: #c2c4c4;
  39. }
  40. .box .content .bottom .down .sc{
  41. font-size: 16px;
  42. }
  43. .box .content .bottom .down .sc:hover{
  44. color: red;
  45. cursor: pointer;
  46. }
  47. .box .content .bottom .down span{
  48. margin-left: 70px;
  49. margin-right: 10px;
  50. }
  51. .box .content .bottom .up,.down{
  52. display: flex;
  53. flex-direction: row;
  54. place-items: center;
  55. }
  56. .content img {
  57. width: 100%;
  58. border-radius: 5px 5px 0 0;
  59. }
  60. .wrapper {
  61. display: grid;
  62. grid-gap: 30px 20px;
  63. grid-template-columns: repeat(5, 224px);
  64. place-content: center;
  65. }
相关推荐
阅读 +