博客列表 >PHP中文网的架构

PHP中文网的架构

风车
风车原创
2022年07月20日 16:10:30400浏览

主要用到grid布局和flex布局,右侧导航栏用的固定定位

下面是代码

  1. <!DOCTYPE html>
  2. <html lang="zh-CN">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <title>PHP中文网</title>
  8. <link rel="stylesheet" href="CSS/icon.css">
  9. <link rel="stylesheet" href="CSS/head.css">
  10. </head>
  11. <body>
  12. <!-- 页面头部 -->
  13. <header>
  14. <!-- 顶部 -->
  15. <div class="top">
  16. <div class="content">
  17. <div class="title">PHP中文网,程序员梦开始的地方</div>
  18. <div class="right">
  19. <a href="" class="iconfont icon-tixingtianchong"></a>
  20. <a href="" ><img src="images\user-pic.jpeg" alt="" width="35px"></a>
  21. </div>
  22. </div>
  23. <!-- 导航 -->
  24. </div>
  25. <div class="navs">
  26. <div class="text">
  27. <a href=""><img src="images\logo.png" alt=""></a>
  28. <nav>
  29. <a href="">首页</a>
  30. <a href="">视频教程</a>
  31. <a href="">学习路径</a>
  32. <a href="">PHP培训</a>
  33. <a href="">资源下载</a>
  34. <a href="">技术文章</a>
  35. <a href="">社区</a>
  36. <a href=""> <img src="" alt=""> APP下载</a>
  37. </nav>
  38. <div class="search">
  39. <a href=""></a> <input type="search" name="" id="" value="">
  40. </div>
  41. </div>
  42. </div>
  43. </header>
  44. <!-- 页面主题 -->
  45. <main>
  46. <!-- 主页导航 -->
  47. <div class="navs">
  48. <div class="left">
  49. <a href="">PHP开发</a>
  50. <a href="">大前端</a>
  51. <a href="">后端开发</a>
  52. <a href="">数据库</a>
  53. <a href="">移动端</a>
  54. <a href="">运维开发</a>
  55. <a href="">UI设计</a>
  56. <a href="">计算机基础</a>
  57. </div>
  58. <div class="slider">
  59. <a href=""><img src="images\slider.jpeg" alt=""></a>
  60. </div>
  61. <div class="lefts">
  62. <!-- 右边 -->
  63. <div class="usue">
  64. </div>
  65. <div class="lefts">
  66. <div class="my">
  67. <a href=""><img src="images\user-pic.jpeg" alt=""></a>
  68. <div class="mmy">
  69. <a href="">风车</a>
  70. <a href="">粉丝:1852W</a>
  71. </div>
  72. </div>
  73. <DIV class="sloo">我的学习</DIV>
  74. <div class="mys">
  75. <a href="">问答社区</a>
  76. <a href="">头条</a>
  77. <a href="">福利</a>
  78. <a href="">新班</a>
  79. <a href="">招募</a>
  80. <a href="">公告</a>
  81. </div>
  82. </div>
  83. </div>
  84. </div>
  85. <!-- 学习科目导航 -->
  86. <div class="xuexi">
  87. <div>
  88. <ul class="kemu">
  89. <li>
  90. <a href="">学习路径</a>
  91. <span>全部七个</span>
  92. </li>
  93. <li>
  94. <img src="images\ynxj.png" alt="">
  95. <a href="">独孤九剑</a>
  96. <span>9门课程</span>
  97. </li>
  98. <li>
  99. <img src="images\ynxj.png" alt="">
  100. <a href="">玉女心经</a>
  101. <span>6门课程</span>
  102. </li>
  103. <li>
  104. <img src="images\ynxj.png" alt="">
  105. <a href="">天龙八部</a>
  106. <span>7门课程</span>
  107. </li>
  108. <li>
  109. <img src="images\ynxj.png" alt="">
  110. <a href="">自学指南</a>
  111. <span>5门课程</span>
  112. </li>
  113. <li>
  114. <img src="images\ynxj.png" alt="">
  115. <a href="">趣味闯关</a>
  116. <span>3门课程</span>
  117. </li>
  118. </ul>
  119. </div>
  120. <div class="lianxi">
  121. <ul>
  122. <li>
  123. <img src="" alt="">
  124. </li>
  125. </ul>
  126. </div>
  127. </div>
  128. <!-- 侧边导航 -->
  129. <div class="cebian" >
  130. <a href="">直播课</a>
  131. <a href="">限时折扣</a>
  132. <a href="">最新课程</a>
  133. <a href="">热门推荐</a>
  134. <a href="">手册教材</a>
  135. <a href="">资源下载</a>
  136. <a href="">技术文章</a>
  137. <a href="">博客文章</a>
  138. <a href="">社区问答</a>
  139. <a href="">APP下载</a>
  140. </div>
  141. <!-- 直播课导航 -->
  142. <div class="zhibo">
  143. <div class="top">
  144. <span>直播课</span>
  145. <span>更多></span>
  146. </div>
  147. <div class="kemu">
  148. <div>
  149. <a href=""><img src="images\kmzyt.png" alt="" ></a>
  150. <a href="">第二十期:前端开发</a>
  151. <a href="" class="huif"><span>精彩回放</span> <span>15154人感兴趣</span></a>
  152. </div>
  153. <div>
  154. <a href=""><img src="images\kmzyt.png" alt="" ></a>
  155. <a href="">第二十期:前端开发</a>
  156. <a href="" class="huif"><span>精彩回放</span> <span>15154人感兴趣</span></a>
  157. </div>
  158. <div>
  159. <a href=""><img src="images\kmzyt.png" alt="" ></a>
  160. <a href="">第二十期:前端开发</a>
  161. <a href="" class="huif"><span>精彩回放</span> <span>15154人感兴趣</span></a>
  162. </div>
  163. </div>
  164. </div>
  165. <!-- 限时折扣 -->
  166. <div class="zekou">
  167. <div class="top">
  168. <span>限时折扣</span>
  169. <span>更多></span>
  170. </div>
  171. <div class="kemu">
  172. <div>
  173. <a href=""><img src="images\kmzyt.png" alt="" ></a>
  174. <a href="">第二十期:前端开发</a>
  175. <a href="" class="huif"><span>154人感兴趣</span> <span>收藏</span></a>
  176. <a href="" class="xians"><span>限时折扣,仅剩两天</span> </a>
  177. <a href="">¥588 </a>
  178. </div>
  179. <div>
  180. <a href=""><img src="images\kmzyt.png" alt="" ></a>
  181. <a href="">第二十期:前端开发</a>
  182. <a href="" class="huif"><span>154人感兴趣</span> <span>收藏</span></a>
  183. <a href="" class="xians"><span>限时折扣,仅剩两天</span> </a>
  184. <a href="">¥588 </a>
  185. </div>
  186. <div>
  187. <a href=""><img src="images\kmzyt.png" alt="" ></a>
  188. <a href="">第二十期:前端开发</a>
  189. <a href="" class="huif"><span>154人感兴趣</span> <span>收藏</span></a>
  190. <a href="" class="xians"><span>限时折扣,仅剩两天</span> </a>
  191. <a href="">¥588 </a>
  192. </div>
  193. <div>
  194. <a href=""><img src="images\kmzyt.png" alt="" ></a>
  195. <a href="">第二十期:前端开发</a>
  196. <a href="" class="huif"><span>154人感兴趣</span> <span>收藏</span></a>
  197. <a href="" class="xians"><span>限时折扣,仅剩两天</span> </a>
  198. <a href="">¥588 </a>
  199. </div>
  200. <div>
  201. <a href=""><img src="images\kmzyt.png" alt="" ></a>
  202. <a href="">第二十期:前端开发</a>
  203. <a href="" class="huif"><span>154人感兴趣</span> <span>收藏</span></a>
  204. <a href="" class="xians"><span>限时折扣,仅剩两天</span> </a>
  205. <a href="">¥588 </a>
  206. </div>
  207. </div>
  208. </div>
  209. <!-- 最新课程 -->
  210. <div class="zuixn">
  211. <div class="top">
  212. <span>限时折扣</span>
  213. <span>更多></span>
  214. </div>
  215. <div class="kemu">
  216. <div>
  217. <a href=""><img src="images\kmzyt.png" alt="" ></a>
  218. <a href="">第二十期:前端开发</a>
  219. <a href="" class="huif"><span>154人感兴趣</span> <span>收藏</span></a>
  220. </div>
  221. <div>
  222. <a href=""><img src="images\kmzyt.png" alt="" ></a>
  223. <a href="">第二十期:前端开发</a>
  224. <a href="" class="huif"><span>154人感兴趣</span> <span>收藏</span></a>
  225. </div>
  226. <div>
  227. <a href=""><img src="images\kmzyt.png" alt="" ></a>
  228. <a href="">第二十期:前端开发</a>
  229. <a href="" class="huif"><span>154人感兴趣</span> <span>收藏</span></a>
  230. </div>
  231. <div>
  232. <a href=""><img src="images\kmzyt.png" alt="" ></a>
  233. <a href="">第二十期:前端开发</a>
  234. <a href="" class="huif"><span>154人感兴趣</span> <span>收藏</span></a>
  235. </div>
  236. <div>
  237. <a href=""><img src="images\kmzyt.png" alt="" ></a>
  238. <a href="">第二十期:前端开发</a>
  239. <a href="" class="huif"><span>154人感兴趣</span> <span>收藏</span></a>
  240. </div>
  241. <div>
  242. <a href=""><img src="images\kmzyt.png" alt="" ></a>
  243. <a href="">第二十期:前端开发</a>
  244. <a href="" class="huif"><span>154人感兴趣</span> <span>收藏</span></a>
  245. </div>
  246. <div>
  247. <a href=""><img src="images\kmzyt.png" alt="" ></a>
  248. <a href="">第二十期:前端开发</a>
  249. <a href="" class="huif"><span>154人感兴趣</span> <span>收藏</span></a>
  250. </div>
  251. <div>
  252. <a href=""><img src="images\kmzyt.png" alt="" ></a>
  253. <a href="">第二十期:前端开发</a>
  254. <a href="" class="huif"><span>154人感兴趣</span> <span>收藏</span></a>
  255. </div>
  256. <div>
  257. <a href=""><img src="images\kmzyt.png" alt="" ></a>
  258. <a href="">第二十期:前端开发</a>
  259. <a href="" class="huif"><span>154人感兴趣</span> <span>收藏</span></a>
  260. </div>
  261. <div>
  262. <a href=""><img src="images\kmzyt.png" alt="" ></a>
  263. <a href="">第二十期:前端开发</a>
  264. <a href="" class="huif"><span>154人感兴趣</span> <span>收藏</span></a>
  265. </div>
  266. </div>
  267. </div>
  268. <!-- 热门推荐 -->
  269. <div class="remen">
  270. <div class="top">
  271. <span>热门推荐</span>
  272. <span>更多></span>
  273. </div>
  274. <div class="kemu">
  275. <div>
  276. <a href=""><img src="images\kmzyt.png" alt="" ></a>
  277. <a href="">第二十期:前端开发</a>
  278. <a href="" class="huif"><span>154人感兴趣</span> <span>收藏</span></a>
  279. </div>
  280. <div>
  281. <a href=""><img src="images\kmzyt.png" alt="" ></a>
  282. <a href="">第二十期:前端开发</a>
  283. <a href="" class="huif"><span>154人感兴趣</span> <span>收藏</span></a>
  284. </div>
  285. <div>
  286. <a href=""><img src="images\kmzyt.png" alt="" ></a>
  287. <a href="">第二十期:前端开发</a>
  288. <a href="" class="huif"><span>154人感兴趣</span> <span>收藏</span></a>
  289. </div>
  290. <div>
  291. <a href=""><img src="images\kmzyt.png" alt="" ></a>
  292. <a href="">第二十期:前端开发</a>
  293. <a href="" class="huif"><span>154人感兴趣</span> <span>收藏</span></a>
  294. </div>
  295. <div>
  296. <a href=""><img src="images\kmzyt.png" alt="" ></a>
  297. <a href="">第二十期:前端开发</a>
  298. <a href="" class="huif"><span>154人感兴趣</span> <span>收藏</span></a>
  299. </div>
  300. <div>
  301. <a href=""><img src="images\kmzyt.png" alt="" ></a>
  302. <a href="">第二十期:前端开发</a>
  303. <a href="" class="huif"><span>154人感兴趣</span> <span>收藏</span></a>
  304. </div>
  305. <div>
  306. <a href=""><img src="images\kmzyt.png" alt="" ></a>
  307. <a href="">第二十期:前端开发</a>
  308. <a href="" class="huif"><span>154人感兴趣</span> <span>收藏</span></a>
  309. </div>
  310. <div>
  311. <a href=""><img src="images\kmzyt.png" alt="" ></a>
  312. <a href="">第二十期:前端开发</a>
  313. <a href="" class="huif"><span>154人感兴趣</span> <span>收藏</span></a>
  314. </div>
  315. <div>
  316. <a href=""><img src="images\kmzyt.png" alt="" ></a>
  317. <a href="">第二十期:前端开发</a>
  318. <a href="" class="huif"><span>154人感兴趣</span> <span>收藏</span></a>
  319. </div>
  320. <div>
  321. <a href=""><img src="images\kmzyt.png" alt="" ></a>
  322. <a href="">第二十期:前端开发</a>
  323. <a href="" class="huif"><span>154人感兴趣</span> <span>收藏</span></a>
  324. </div>
  325. </div>
  326. </div>
  327. <!-- 词典分类 -->
  328. <div class="daci">
  329. <div class="cidian">
  330. <a href="" class="head">词典分类</a>
  331. <a href="">大前端</a>
  332. <a href="">后端开发</a>
  333. <a href="">数据库</a>
  334. <a href="">移动端</a>
  335. <a href="">运维开发</a>
  336. <a href="">UI设计</a>
  337. <a href="">计算机基础</a>
  338. </div>
  339. <div class="sousu">
  340. <div class="sousu1">
  341. <span>词典查询</span><span>全部词典</span><span>最近更新</span>
  342. </div>
  343. <div class="sousu2">编程词典</div>
  344. <div class="sousu3">服务马龙在线技术手册</div>
  345. <div class="chaxun">
  346. </div>
  347. </div>
  348. </div>
  349. </main>
  350. </body>
  351. </html>

CSS样式

  1. * {
  2. margin: 0;
  3. padding: 0;
  4. /* 取消下划线 */
  5. text-decoration: none;
  6. /* 所有字体为黑色 */
  7. color: #000;
  8. }
  9. /* 取消小圆点 */
  10. li{
  11. list-style: none;
  12. }
  13. body {
  14. background-color: #f3f5f7;
  15. }
  16. main{
  17. width: 1200px;
  18. margin: 0 auto;
  19. }
  20. body .top {
  21. width: 100vw;
  22. height: 40px;
  23. background-color: #343434;
  24. color: #aaa;
  25. }
  26. header .top .content {
  27. width: 1200px;
  28. display: grid;
  29. grid-template-columns: 400px 100px;
  30. place-content: space-between;
  31. /* 向左居中 */
  32. place-items: center start;
  33. /* 外边距自动计算居中 */
  34. margin: auto;
  35. }
  36. header .top .content .iconfont {
  37. color: aliceblue;
  38. font-size: larger;
  39. }
  40. header .top .content img {
  41. /* 圆角 */
  42. border-radius: 50%;
  43. }
  44. header .top .content .right {
  45. display: grid;
  46. grid-template-columns: repeat(2, 1fr);
  47. place-items: center;
  48. }
  49. /* 导航部分 */
  50. body .navs {
  51. width: 100vw;
  52. height: 90px;
  53. background-color: #ffffff;
  54. color: #aaa;
  55. }
  56. header .navs .text {
  57. width: 1200px;
  58. display: grid;
  59. grid-template-columns: 140px 1fr 100px;
  60. margin:auto;
  61. /* 居中 */
  62. place-items: center;
  63. }
  64. header .navs .text img {
  65. width: 140px;
  66. }
  67. header .navs .text nav {
  68. display: flex;
  69. }
  70. header .navs .text nav a{
  71. padding: 0 15px;
  72. }
  73. header .navs .text nav a:hover{
  74. color: blue;
  75. }
  76. header .navs .text .search input[type="search"]{
  77. width: 200px;
  78. height: 38px;
  79. border: none;
  80. background-color: #eee;
  81. /* 圆角 */
  82. border-radius: 20px;
  83. }
  84. main .navs {
  85. width: 1200px;
  86. display: grid;
  87. grid-template-columns: 200px 750px 200px;
  88. margin: 50px auto;
  89. /* 项目边距 */
  90. gap: 25px ;
  91. background-color: #f3f5f7;
  92. grid-auto-flow: row;
  93. }
  94. main .navs .left {
  95. background-color: #ffffff;
  96. border-radius: 25px 25px;
  97. display: flex;
  98. flex-flow: column nowrap;
  99. place-content: space-evenly;
  100. place-items: center;
  101. }
  102. main .navs .slider img {
  103. width: 750px;
  104. height: 400px;
  105. border-radius: 25px 25px;
  106. }
  107. main .navs .lefts {
  108. height: 400px;
  109. background-color: #ffffff;
  110. border-radius: 25px 25px;
  111. display: flex;
  112. flex-flow: column nowrap;
  113. place-content: space-around;
  114. place-items: center;
  115. }
  116. main .navs .lefts .my img {
  117. width: 50px;
  118. border-radius: 50% 50% ;
  119. }
  120. main .navs .lefts .mys{
  121. height: 250px;
  122. display: flex;
  123. flex-flow: column nowrap;
  124. place-content: space-around;
  125. place-items: center;
  126. }
  127. main .navs .lefts .my{
  128. display: grid;
  129. grid-auto-flow: column;
  130. }
  131. main .navs .lefts .my .mmy{
  132. display: grid;
  133. margin: 5px;
  134. /* 项目居中 */
  135. place-items: center;
  136. }
  137. main .navs .lefts .sloo{
  138. background-color: red;
  139. width: 120px;
  140. height: 30px;
  141. color:#fff;
  142. border-radius: 15px;
  143. text-align: center;
  144. }
  145. /* --------------课程导航--------------- */
  146. main .xuexi{
  147. width: 1200px;
  148. height: 90px;
  149. margin: auto;
  150. /* 上边距 */
  151. padding: 300px 0 0 0;
  152. display: grid;
  153. grid-template-columns: 975px 200px;
  154. gap: 25px;
  155. height: 80px;}
  156. main .xuexi img {
  157. width: 40px;
  158. }
  159. main .xuexi div{
  160. background-color: #fff;
  161. border-radius: 25px 25px;
  162. }
  163. main .xuexi div .kemu {
  164. display: flex;
  165. place-items: center;
  166. flex-flow: row nowrap;
  167. place-content: space-evenly;
  168. padding: 15px 0 0 0;
  169. }
  170. main .xuexi div .kemu li {
  171. display: grid;
  172. grid-template-rows: repeat(2 , 1fr);
  173. grid-template-columns: repeat(2 , 1fr);
  174. place-items: center;
  175. padding: 6px;
  176. }
  177. /* span里面的字体颜色 大小 */
  178. main .xuexi div .kemu li span{
  179. color: #999;
  180. font-size: 12px;
  181. }
  182. /* 图片跨栏 */
  183. main .xuexi div .kemu li img {
  184. grid-row: 1 / span 2;
  185. }
  186. /* 选中li标签中的第一个 */
  187. main .xuexi div .kemu li:first-of-type {
  188. display: flex;
  189. flex-flow: column;
  190. }
  191. /* -----------侧边导航---------------- */
  192. main .cebian {
  193. display: flex;
  194. flex-flow: column;
  195. position: fixed;
  196. top: 300px;
  197. right: 0;
  198. background-color: #fff;
  199. place-items: center;
  200. border-radius: 15px 15px;
  201. }
  202. main .cebian a:hover{
  203. color: red;
  204. }
  205. main .cebian a{
  206. margin: 10px 15px;
  207. font-size: 12px;
  208. }
  209. /* -------------直播课区域----------- */
  210. main .zhibo .top {
  211. background-color: #f3f5f7;
  212. margin:50px 0 0 0 ;
  213. font-size: larger;
  214. display: grid;
  215. grid-template-columns: 100px 100px;
  216. gap: 1000px;
  217. }
  218. main .zhibo .kemu{
  219. display: grid;
  220. grid-template-columns: repeat(4,1fr);
  221. gap: 25px;
  222. }
  223. main .zhibo .kemu div {
  224. width: 300px;
  225. height: 280px;
  226. background-color: #fff;
  227. border-radius: 25px 25px;
  228. display: grid;
  229. grid-template-rows: repeat(3 , 1fr);
  230. place-items:center;
  231. }
  232. /* 图片圆角 */
  233. main .zhibo .kemu img {
  234. width: 100%;
  235. border-radius: 25px 25px 0px 0px ;
  236. }
  237. main .zhibo .kemu div .huif{
  238. display: grid;
  239. grid-template-columns: repeat(2,1fr);
  240. gap: 100px;
  241. font-size: 12px;
  242. }
  243. main .zhibo .kemu div .huif span{
  244. color: #aaa;
  245. }
  246. /* --------------限时折扣---------- */
  247. main .zekou .top {
  248. background-color: #f3f5f7;
  249. margin:50px 0 0 0 ;
  250. font-size: larger;
  251. display: grid;
  252. grid-template-columns:100px 100px;
  253. gap: 1000px;
  254. }
  255. main .zekou .kemu{
  256. display: grid;
  257. grid-template-columns: repeat(5,1fr);
  258. gap: 25px;
  259. }
  260. main .zekou .kemu div {
  261. width: 220px;
  262. height: 250px;
  263. background-color: #fff;
  264. border-radius: 10px 10px;
  265. display: grid;
  266. grid-template-rows: repeat(5 , 1fr);
  267. place-items:center;
  268. }
  269. /* 图片圆角 */
  270. main .zekou .kemu img {
  271. width: 100%;
  272. border-radius: 10px 10px 0px 0px ;
  273. }
  274. main .zekou .kemu div .huif{
  275. display: grid;
  276. grid-template-columns: repeat(2,1fr);
  277. gap: 100px;
  278. font-size: 12px;
  279. }
  280. main .zekou .kemu div .huif span{
  281. color: #aaa;
  282. }
  283. main .zekou .kemu div .xians span{
  284. color:red;
  285. }
  286. /* ----------最新课程---------- */
  287. main .zuixn .top {
  288. background-color: #f3f5f7;
  289. margin:50px 0 0 0 ;
  290. font-size: larger;
  291. display: grid;
  292. grid-template-columns:100px 100px;
  293. gap: 1000px;
  294. }
  295. main .zuixn .kemu{
  296. display: grid;
  297. grid-template-columns: repeat(5,1fr);
  298. gap: 25px;
  299. }
  300. main .zuixn .kemu div {
  301. width: 220px;
  302. height: 250px;
  303. background-color: #fff;
  304. border-radius: 10px 10px;
  305. display: grid;
  306. grid-template-rows: repeat(3 , 1fr);
  307. place-items:center;
  308. }
  309. /* 图片圆角 */
  310. main .zuixn .kemu img {
  311. width: 100%;
  312. border-radius: 10px 10px 0px 0px ;
  313. }
  314. main .zuixn .kemu div .huif{
  315. display: grid;
  316. grid-template-columns: repeat(2,1fr);
  317. gap: 100px;
  318. font-size: 12px;
  319. }
  320. main .zuixn .kemu div .huif span{
  321. color: #aaa;
  322. }
  323. main .zuixn .kemu div .xians span{
  324. color:red;
  325. }
  326. /* -----------热门推荐---------- */
  327. main .remen .top {
  328. background-color: #f3f5f7;
  329. margin:50px 0 0 0 ;
  330. font-size: larger;
  331. display: grid;
  332. grid-template-columns:100px 100px;
  333. gap: 1000px;
  334. }
  335. main .remen .kemu{
  336. display: grid;
  337. grid-template-columns: repeat(5,1fr);
  338. gap: 25px;
  339. }
  340. main .remen .kemu div {
  341. width: 220px;
  342. height: 250px;
  343. background-color: #fff;
  344. border-radius: 10px 10px;
  345. display: grid;
  346. grid-template-rows: repeat(3 , 1fr);
  347. place-items:center;
  348. }
  349. /* 图片圆角 */
  350. main .remen .kemu img {
  351. width: 100%;
  352. border-radius: 10px 10px 0px 0px ;
  353. }
  354. main .remen .kemu div .huif{
  355. display: grid;
  356. grid-template-columns: repeat(2,1fr);
  357. gap: 100px;
  358. font-size: 12px;
  359. }
  360. main .remen .kemu div .huif span{
  361. color: #aaa;
  362. }
  363. /* ----------词典分类----------- */
  364. main .daci{
  365. display: grid;
  366. grid-template-columns: 220px 1fr;
  367. gap: 10px;
  368. margin: 25px 0 0 0;
  369. }
  370. main .cidian{
  371. display: flex;
  372. flex-flow: column ;
  373. width: 220px;
  374. background-color: #fff;
  375. border-radius: 15px 15px;
  376. place-content: space-around;
  377. }
  378. main .cidian a{
  379. margin: 10px 30px;
  380. font-size: 12px;
  381. }
  382. main .daci .sousu{
  383. display: grid;
  384. grid-template-rows:50px 30px 20px 1fr;
  385. background-color: #fff;
  386. padding: 15px;
  387. }
  388. main .daci .sousu .sousu1 {
  389. display: grid;
  390. grid-template-columns: 100px 100px 100px;
  391. }
  392. main .daci .sousu .sousu2,
  393. main .daci .sousu .sousu3{
  394. display: flex;
  395. place-content: center;
  396. }
  397. main .daci .sousu .sousu3{
  398. font-size: 12px;
  399. color: #aaa;
  400. }

运行效果

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