Blogger Information
Blog 34
fans 0
comment 0
visits 19964
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
【案例】仿PHP.CN首页部分
OC的PHP大牛之路
Original
312 people have browsed it

html

  1. <!-- 添加部分开始 -->
  2. <div class="right">
  3. <div class="top">
  4. <a href=""><img src="static/images/user-pic.jpeg" alt="100px"></a>
  5. <a href=""><b>猪老师</b></a>
  6. <a href="">P豆 2065</a>
  7. </div>
  8. <div class="xuexi">
  9. <a href="">我要学习</a>
  10. </div>
  11. <div style="border-bottom: 1px solid #eeeeee; margin-top: 10px;"></div>
  12. <div class="wenda">
  13. <span>问答社区</span>
  14. <a href="" class="dayi">答疑</a>
  15. </div>
  16. <div class="xia">
  17. <div class="toutiao">
  18. <span>头条</span>
  19. <a href="" class="huise">试题(附源码级详解)</a>
  20. </div>
  21. <div class="fuli">
  22. <span>福利</span>
  23. <a href="" class="huise">限时折扣>></a>
  24. </div>
  25. <div class="xinban">
  26. <span>新班</span>
  27. <a href="" class="huise">20期php线上班</a>
  28. </div>
  29. <div class="zhaomu">
  30. <span>招募</span>
  31. <a href="" class="huise">课程合作计划</a>
  32. </div>
  33. <div class="gonggao">
  34. <span>公告</span>
  35. <a href="" class="huise">APP上线啦</a>
  36. </div>
  37. </div>
  38. </div>
  39. <!-- 添加部分结束 -->
  1. <!-- 添加部分开始 -->
  2. <div class="bottom-right">
  3. <div class="wx">
  4. <a href="" class="iconfont icon-weixin"></a>
  5. </div>
  6. <span class="weixin">微信公众号</span>
  7. <div class="qq">
  8. <a href="" class="iconfont icon-QQ"></a>
  9. </div>
  10. <span class="qqqqun">官方QQ群</span>
  11. </div>
  12. <!-- 添加部分结束 -->

CSS

  1. /* 添加部分开始 */
  2. main .navs .right .top{
  3. display: grid;
  4. grid-template-columns:repeat(2,1fr);
  5. grid-template-rows:repeat(2,1fr);
  6. grid-row: 1 / span 2;
  7. }
  8. main .navs .right .top a:nth-of-type(1) {
  9. grid-row: 1/ 3;
  10. padding:10px 15px;
  11. }
  12. main .navs .right .top a:nth-of-type(2) {
  13. place-self:center start;
  14. }
  15. main .navs .right .top img{
  16. border-radius: 100px;
  17. width: 60px;
  18. }
  19. main .navs .right .xuexi{
  20. display: flex;
  21. background: #f11717;
  22. width: 160px;
  23. padding: 10px;
  24. margin:0px 15px;
  25. border-radius: 30px;
  26. place-content:center;
  27. }
  28. main .navs .right .xuexi > a {
  29. color: #ffffff;
  30. }
  31. main .navs .right .wenda {
  32. display: flex;
  33. width: 190px;
  34. padding:10px 15px;
  35. }
  36. main .navs .right .wenda a {
  37. background: #ff583d;
  38. color:#ffffff;
  39. border-radius: 1px;
  40. }
  41. main .navs .right .wenda .dayi{
  42. margin: 0px 10px;
  43. place-self:top;
  44. }
  45. main .navs .right .xia{
  46. display: grid;
  47. padding: 15px;
  48. gap:20px;
  49. }
  50. main .navs .right .xia .huise{
  51. color: #ccc;
  52. }
  53. main .navs .bottom-right {
  54. display: grid;
  55. grid-template-columns: 1fr 1fr;
  56. place-items: center;
  57. }
  58. main .navs .bottom-right .weixin{
  59. grid-area: 2;
  60. }
  61. /* 添加部分结束 */
Correcting teacher:PHPzPHPz

Correction status:qualified

Teacher's comments:
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post