博客列表 >仿PHP中文网右侧部分

仿PHP中文网右侧部分

想做肥仔
想做肥仔原创
2022年04月04日 02:51:08738浏览

HTML代码

  1. <header>
  2. <!-- 头部个人信息 -->
  3. <div class="php-top">
  4. <div class="cnotent-top">
  5. <div class="title">php中文网,程序员梦开始的地方!</div>
  6. <div class="right">
  7. <a href="" class="iconfont icon-tixing"></a>
  8. <a href=""><img src="static/images/user-pic.jpg" alt=""> </a>
  9. </div>
  10. </div>
  11. </div>
  12. <!-- 头部导航 -->
  13. <div class="nvas-top">
  14. <div class="content">
  15. <!-- logo -->
  16. <a href="">
  17. <img src="static/images/logo.png" alt="">
  18. </a>
  19. <!-- 导航栏 -->
  20. <nav>
  21. <a href="" class="active">首页</a>
  22. <a href="">视频教程</a>
  23. <a href="">学习路径</a>
  24. <a href="">php培训</a>
  25. <a href="">资源下载</a>
  26. <a href="">技术文章</a>
  27. <a href="">社区</a>
  28. <a href="">APP下载</a>
  29. <a href="">...</a>
  30. </nav>
  31. <!-- 输入框 -->
  32. <div class="search">
  33. <input type="search" placeholder="输入关键词搜索">
  34. <span class="iconfont icon-fangdajing"></span>
  35. </div>
  36. </div>
  37. </div>
  38. </header>
  39. <!-- 主体 -->
  40. <main>
  41. <div class="part">
  42. <!-- 左侧导航 -->
  43. <div class="left">
  44. <a href="">php开发</a>
  45. <a href="">大前端</a>
  46. <a href="">后端开发</a>
  47. <a href="">数据库</a>
  48. <a href="">移动端</a>
  49. <a href="">运维开发</a>
  50. <a href="">UI设计</a></a>
  51. <a href="">计算机基础</a>
  52. </div>
  53. <!-- 中间轮播图 -->
  54. <div class="mid">
  55. <a href=""><img src="static/images/623980ded5fcf319.jpg" alt=""></a>
  56. </div>
  57. <!-- 右侧公告 -->
  58. <div class="right">
  59. <!-- 上 -->
  60. <div class="top-r">
  61. <div class="top-r-img">
  62. <img src="static/images/user-pic.jpg" alt="">
  63. <a href="">晴天有雨</a>
  64. <span>P豆:14</span>
  65. </div>
  66. <div class="rbox"><a href="">我的学习</a></div>
  67. </div>
  68. <!-- 下 -->
  69. <div class="main-box">
  70. <p>
  71. <span>问答社区</span>
  72. <a href="">答疑</a>
  73. </p>
  74. <ul class="hos">
  75. <li>
  76. <span>头条</span>
  77. <a href="">首个中文操作系统出现了</a>
  78. </li>
  79. <li>
  80. <span>新课</span>
  81. <a href="">3.9号公益直播课</a>
  82. </li>
  83. <li>
  84. <span>新班</span>
  85. <a href="">19期PHPH直播班</a>
  86. </li>
  87. <li>
  88. <span>招募</span>
  89. <a href="">课程合作计划</a>
  90. </li>
  91. <li>
  92. <span>公告</span>
  93. <a href="">APP上线了</a>
  94. </li>
  95. </ul>
  96. </div>
  97. </div>
  98. <!-- !底部左侧 -->
  99. <div class="bottom-left">
  100. <!-- 学习路径 -->
  101. <div class="desc">
  102. <div class="title">学习路径</div>
  103. <span>全部7个&gt;</span>
  104. </div>
  105. <!-- 详情 -->
  106. <ul class="detail">
  107. <li onclick="">
  108. <img src="static/images/dgjj.png" alt="">
  109. <a href="">独孤九贱</a>
  110. <span>9门课程</span>
  111. </li>
  112. <li onclick="">
  113. <img src="static/images/ynxj.png" alt="">
  114. <a href="">欲女心经</a>
  115. <span>3门课程</span>
  116. </li>
  117. <li onclick="">
  118. <img src="static/images/tlbb.png" alt="">
  119. <a href="">天龙八部</a>
  120. <span>15门课程</span>
  121. </li>
  122. <li onclick="">
  123. <img src="static/images/ynxj.png" alt="">
  124. <a href="">自学指南</a>
  125. <span>8门课程</span>
  126. </li>
  127. <li onclick="">
  128. <img src="static/images/phpksrm.png" alt="">
  129. <a href="">趣味闯关</a>
  130. <span>22门课程</span>
  131. </li>
  132. </ul>
  133. </div>
  134. <!-- 底部右侧 -->
  135. <div class="bottom-right">
  136. <div class="bottom-right1">
  137. <a href="" class="iconfont icon-weixin"></a>
  138. <h1>官网公共号</h1>
  139. </div>
  140. <div class="bottom-right2">
  141. <a href="" class="iconfont icon-qq"></a>
  142. <h1>官方QQ群</h1>
  143. </div>
  144. </div>
  145. </div>
  146. </main>

CSS部分代码

  1. /* 右侧 */
  2. main .part .right .main-box {
  3. width: 150px;
  4. height: auto;
  5. position: relative;
  6. left: 28px;
  7. top: 24px;
  8. /* display: grid;
  9. place-items: center; */
  10. }
  11. main .part .right .main-box p{
  12. font-size: 14px;
  13. }
  14. main .part .right .main-box p span{
  15. font-size: larger;
  16. color: #333333;
  17. }
  18. main .part .right .main-box p a {
  19. position: relative;
  20. font-size: 12px;
  21. color: white;
  22. left: 8px;
  23. background-color: red;
  24. padding: 1px;
  25. /* display: grid; */
  26. }
  27. main .part .right .main-box .hos{
  28. width: 140px;
  29. height: auto;
  30. }
  31. main .part .right .main-box .hos li {
  32. padding-top: 5px;
  33. height: 38px;
  34. font-size: 10px;
  35. }
  36. main .part .right .main-box .hos li:nth-of-type(1){
  37. padding-top: 5px;
  38. height: 41px;
  39. }
  40. main .part .right .main-box .hos li a {
  41. padding-left: 5px;
  42. color: #b6b6b6;
  43. font-size: 12px;
  44. }
  45. main .part .right .main-box .hos li a:hover{
  46. color: red;
  47. }
  48. /* 底部右侧 */
  49. main .part .bottom-right{
  50. display: grid;
  51. grid-template-columns: repeat(2,1fr);
  52. place-items: center;
  53. }
  54. main .part .bottom-right .bottom-right1 {
  55. display: grid;
  56. place-items: center;
  57. }
  58. main .part .bottom-right .bottom-right1 h1{
  59. font-size: 14px;
  60. }
  61. main .part .bottom-right .bottom-right1 h1 :hover{
  62. color: red;
  63. }
  64. main .part .bottom-right .bottom-right1 .icon-weixin {
  65. font-size: 26px;
  66. }
  67. main .part .bottom-right .bottom-right2 {
  68. display: grid;
  69. place-items: center;
  70. }
  71. main .part .bottom-right .bottom-right2 .icon-qq {
  72. font-size: 26px;
  73. }
  74. main .part .bottom-right .bottom-right2 h1{
  75. font-size: 14px;
  76. }
  77. main .part .bottom-right .bottom-right2 h1 :hover{
  78. background-color: red;
  79. }

效果展示

示例

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