博客列表 >仿php中文网首页

仿php中文网首页

只如初见
只如初见原创
2022年03月26日 10:32:40295浏览

小实战

html代码

  1. <div class="right">
  2. <div class="right-center">
  3. <div class="right-center-t">
  4. <a href="#"><img src="0325/static/images/user-pic.jpeg" width="40" /></a>
  5. <dl>
  6. <dt><a href="#" title="" class="aBlack">只如初见</a></dt>
  7. <dd>P豆 19</dd>
  8. </dl>
  9. </div>
  10. <a href="" class="right-center-my">我的学习</a>
  11. </div>
  12. <div class="right-art">
  13. <div class="right-art-t">
  14. <span>问答社区</span>
  15. <a href="#">答疑</a>
  16. </div>
  17. <div class="right-art-c">
  18. <ul>
  19. <li>
  20. <div>头条</div>
  21. <div><a href="#">3.9号公益直播课</a></div>
  22. </li>
  23. <li>
  24. <div>头条</div>
  25. <div><a href="#">3.9号公益直播课</a></div>
  26. </li>
  27. <li>
  28. <div>头条</div>
  29. <div><a href="#">3.9号公益直播课</a></div>
  30. </li>
  31. <li>
  32. <div>头条</div>
  33. <div><a href="#">3.9号公益直播课</a></div>
  34. </li>
  35. <li>
  36. <div>头条</div>
  37. <div><a href="#">3.9号公益直播课</a></div>
  38. </li>
  39. <li>
  40. <div>头条</div>
  41. <div><a href="#">3.9号公益直播课</a></div>
  42. </li>
  43. </ul>
  44. </div>
  45. </div>
  46. </div>

css代码

  1. /* 右侧 */
  2. main .right {
  3. }
  4. main .right .right-center {
  5. border-bottom: 1px solid #eeeeee;
  6. padding: 15px 15px 25px;
  7. }
  8. main .right .right-center .right-center-t {
  9. display: grid;
  10. grid-template-columns: 40px 1fr;
  11. }
  12. main .right .right-center .right-center-t img {
  13. border-radius: 20px;
  14. }
  15. main .right .right-center .right-center-t dl {
  16. margin-left: 10px;
  17. }
  18. main .right .right-center .right-center-t dl dt {
  19. margin-bottom: 6px;
  20. }
  21. main .right .right-center .right-center-t dl dt a {
  22. font-weight: bold;
  23. }
  24. main .right .right-center .right-center-t dl dt a:hover {
  25. color: #f11717;
  26. }
  27. main .right .right-center .right-center-t dl dd {
  28. font-size: 12px;
  29. color: #999999;
  30. }
  31. main .right .right-center .right-center-my {
  32. display: block;
  33. width: 100%;
  34. height: 34px;
  35. background: #f11717;
  36. border-radius: 100px;
  37. line-height: 34px;
  38. text-align: center;
  39. color: #ffffff;
  40. margin: 20px auto 0 auto;
  41. }
  42. main .right .right-center .right-center-my:hover {
  43. background: #e11717;
  44. }
  45. main .right .right-art {
  46. padding: 20px 15px 15px;
  47. }
  48. main .right .right-art .right-art-t {
  49. margin-bottom: 17px;
  50. display: flex;
  51. }
  52. main .right .right-art .right-art-t span {
  53. color: #333;
  54. margin-right: 12px;
  55. }
  56. main .right .right-art .right-art-t a {
  57. display: inline-block;
  58. width: 31px;
  59. height: 16px;
  60. background: #ff583d;
  61. border-radius: 2px;
  62. font-size: 12px;
  63. color: #ffffff;
  64. line-height: 16px;
  65. text-align: center;
  66. text-decoration: none;
  67. }
  68. main .right .right-art .right-art-c ul li {
  69. margin-bottom: 12px;
  70. display: flex;
  71. height: 18px;
  72. overflow: hidden;
  73. }
  74. main .right .right-art .right-art-c ul li div:nth-of-type(2) {
  75. text-align: right;
  76. }
  77. main .right .right-art .right-art-c ul li a {
  78. color: #b6b6b6;
  79. padding-left: 10px;
  80. }
  81. main .right .right-art .right-art-c ul li a:hover {
  82. color: #e11717;
  83. }
  84. main .navs .bottom-right {
  85. display: grid;
  86. grid-template-columns: 50% 50%;
  87. text-align: center;
  88. }
  89. main .navs .bottom-right div {
  90. padding-top: 13px;
  91. line-height: 25px;
  92. font-size: 13px;
  93. }
  94. main .navs .bottom-right .iconfont {
  95. font-size: 30px;
  96. color: #ccc;
  97. }

效果图

声明:本文内容转载自脚本之家,由网友自发贡献,版权归原作者所有,如您发现涉嫌抄袭侵权,请联系admin@php.cn 核实处理。
全部评论
文明上网理性发言,请遵守新闻评论服务协议