tnblog
首页
视频
资源
登录

好看的文件管理

4930人阅读 2021/1/23 19:28 总访问:3467476 评论:0 收藏:0 手机
分类: 前端

HTML

  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <!-- 引入字体图标 -->
  7. <!-- <link
  8. href="https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css"
  9. rel="stylesheet"
  10. /> -->
  11. <link href="https://cdn.bootcdn.net/ajax/libs/font-awesome/5.15.2/css/all.min.css" rel="stylesheet">
  12. <link rel="stylesheet" href="index.css">
  13. <title>Document</title>
  14. </head>
  15. <body>
  16. <div class="container">
  17. <div class="top_bar">
  18. <!-- 返回按钮 -->
  19. <div class="back">
  20. <div class="fa fa-chevron_left"></div>
  21. </div>
  22. <!-- 标题 -->
  23. <div class="content">File Manager</div>
  24. <!-- 菜单按钮 -->
  25. <div class="menu">
  26. <div class="fa fa-bars"></div>
  27. </div>
  28. </div>
  29. <!-- 搜索栏 -->
  30. <div class="search">
  31. <!-- 用来制作渐变框以及搜索icon的容器 -->
  32. <div class="input_out">
  33. <div class="fa fa-search"></div>
  34. </div>
  35. <!-- 输入框 -->
  36. <div class="input" type="text" placeholder="let's clean and manage you files"></div>
  37. </div>
  38. <!-- 文件夹 -->
  39. <div class="files">
  40. <div class="file_orange">
  41. <div class="file_icon_container">
  42. <div class="file_icon"></div>
  43. </div>
  44. <span class="name">Documents</span>
  45. <span class="folder">144 folders</span>
  46. </div>
  47. <div class="file_pupple">
  48. <div class="file_icon_container">
  49. <div class="file_icon_blue"></div>
  50. </div>
  51. <span class="name">Documents</span>
  52. <span class="folder">144 folders</span>
  53. </div>
  54. </div>
  55. <!-- 进度条 -->
  56. <div class="progress">
  57. <div class="left">
  58. <!-- 拟态环形与圆形 -->
  59. <div class="circle1"></div>
  60. <div class="circle2"></div>
  61. <div class="circle3"></div>
  62. <div class="circle4"></div>
  63. <div class="circle5"></div>
  64. <div class="circle6"></div>
  65. <div class="circle7"></div>
  66. </div>
  67. <div class="right">
  68. <div class="line">
  69. <span class="toggle">
  70. <div class="big blue">
  71. <div class="small"></div>
  72. </div>
  73. </span>
  74. <span class="text">Phone memory</span>
  75. </div>
  76. <span class="used">Used 10G || Free 26G</span>
  77. <div class="margin"></div>
  78. <div class="line">
  79. <span class="toggle">
  80. <div class="big">
  81. <div class="small"></div>
  82. </div>
  83. </span>
  84. <span class="text">External memory</span>
  85. </div>
  86. <span class="used">Used 10G || Free 26G</span>
  87. </div>
  88. </div>
  89. <div class="items">
  90. <div class="item item1">
  91. <div class="icon_container">
  92. <div class="icon"></div>
  93. </div>
  94. <span class="item_text">
  95. <span class="item_name">Image</span>
  96. <span class="num_item">188 Items</span>
  97. </span>
  98. <i class="fa fa-ellipsis-h"></i>
  99. </div>
  100. <div class="item item2">
  101. <div class="icon_container">
  102. <div class="icon"></div>
  103. </div>
  104. <span class="item_text">
  105. <span class="item_name">Document</span>
  106. <span class="num_item">124 Items</span>
  107. </span>
  108. <i class="fa fa-ellipsis-h"></i>
  109. </div>
  110. </div>
  111. </div>
  112. </body>
  113. </html>

CSS

  1. /* 引入 google 字体 */
  2. @font-face {
  3. font-family: "Montserrat";
  4. font-style: italic;
  5. font-weight: 800;
  6. font-display: swap;
  7. src: url(https://fonts.gstatic.com/s/montserrat/v15/JTUPjIg1_i6t8kCHKm459WxZbgjD-w.ttf) format("truetype");
  8. }
  9. @font-face {
  10. font-family: "Montserrat";
  11. font-style: normal;
  12. font-weight: 100;
  13. font-display: swap;
  14. src: url(https://fonts.gstatic.com/s/montserrat/v15/JTUQjIg1_i6t8kCHKm45_Qphzg.ttf) format("truetype");
  15. }
  16. @font-face {
  17. font-family: "Montserrat";
  18. font-style: normal;
  19. font-weight: 300;
  20. font-display: swap;
  21. src: url(https://fonts.gstatic.com/s/montserrat/v15/JTURjIg1_i6t8kCHKm45_cJD7g4.ttf) format("truetype");
  22. }
  23. /* 全局reset */
  24. * {
  25. margin: 0px;
  26. padding: 0px;
  27. /* 更改盒子模型 */
  28. box-sizing: border-box;
  29. /* 设置全局字段 */
  30. font-family: 'Montserrart', sans-serif;
  31. }
  32. body {
  33. width: 100vw;
  34. height: 100vh;
  35. /* flex 布局设置子元素水平垂直居中 */
  36. display: flex;
  37. justify-content: center;
  38. align-items: center;
  39. /* 设置渐变的背景颜色 */
  40. background: linear-gradient(to bottom right, #272c46, #464c6d);
  41. }
  42. /* 包含所有的布局样式的容器 */
  43. .container {
  44. width: 480px;
  45. height: 1042px;
  46. border-radius: 50%;
  47. /* 设置一个渐变的背景颜色,用来用来模拟变边框 */
  48. background: linear-gradient(to bottom, #fba8bc, rgba(251, 168, 92, 0.1));
  49. position: relative;
  50. }
  51. /* 设置一个稍微小于容器的伪元素并居中,使得container的背景颜色只露出四周一圈,从而达到渐变边框的效果 */
  52. .container:after {
  53. content: '';
  54. position: absolute;
  55. top: 1px;
  56. left: 1px;
  57. width: 478px;
  58. height: 1040px;
  59. background-color: #363c5a;
  60. box-shadow: 26px 16px 35px rgba(0, 0, 0, 0.29);
  61. border-radius: 50px;
  62. }
  63. .container .top_bar {
  64. width: 100%;
  65. position: absolute;
  66. top: 48px;
  67. display: flex;
  68. align-items: center;
  69. justify-content: center;
  70. z-index: 1;
  71. }
  72. /* 返回按钮 */
  73. .container .top_bar .back {
  74. width: 50px;
  75. height: 50px;
  76. background: #414768;
  77. box-shadow: -2px -2px 4px rgba(159, 159, 159, 0.25), 2px 2px 4px rgba(0, 0, 0, 0.25);
  78. border-radius: 15px;
  79. position: relative;
  80. }
  81. /* 同样用到伪元素,达到双层效果 */
  82. .container .top_bar .back:after {
  83. content: '';
  84. position: absolute;
  85. width: 46px;
  86. height: 46px;
  87. left: 2px;
  88. top: 2px;
  89. background: linear-gradient(135deg, #404666 0%, #495077 100%);
  90. border-radius: 15px;
  91. cursor: pointer;
  92. z-index: 1;
  93. transition: all 0.6s;
  94. }
  95. /* 当鼠标hover的时候,有一个向内凹陷的效果 */
  96. .container .top_bar .back:hover::after {
  97. box-shadow: inset -2px -2px 4px rgba(160, 160, 160, 0.25), inset 2px 2px 4px rgba(0, 0, 0, 0.25);
  98. }
  99. /* 字体图标样式 */
  100. .container .top_bar .back .fa {
  101. position: absolute;
  102. left: 13px;
  103. top: 13px;
  104. font-size: 24px;
  105. color: #fff;
  106. z-index: 2;
  107. cursor: pointer;
  108. }
  109. .container .top_bar .content {
  110. font-style: italic;
  111. font-size: 36px;
  112. line-height: 21px;
  113. color: #8d92af;
  114. margin: 0px 29px;
  115. }
  116. /* menu 菜单,同样使用之前的方式使用渐变框 */
  117. .container .top_bar .menu {
  118. width: 36px;
  119. height: 36px;
  120. border-radius: 12px;
  121. background: linear-gradient(to bottom right, #b56773, #000);
  122. box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
  123. position: relative;
  124. }
  125. .container .top_bar .menu:after {
  126. content: '';
  127. position: absolute;
  128. width: 34px;
  129. height: 34px;
  130. left: 1px;
  131. top: 1px;
  132. background: #454c70;
  133. border-radius: 12px;
  134. }
  135. .container .top_bar .menu .fa {
  136. position: absolute;
  137. left: 10px;
  138. top: 10px;
  139. font-size: 16px;
  140. color: #fff;
  141. z-index: 2;
  142. cursor: pointer;
  143. }
  144. /* 搜索栏 */
  145. .container .search {
  146. position: absolute;
  147. top: 132px;
  148. width: 100%;
  149. display: flex;
  150. align-items: center;
  151. justify-content: center;
  152. z-index: 1;
  153. }
  154. .container .search .input_out {
  155. position: relative;
  156. width: 413px;
  157. height: 70px;
  158. background: linear-gradient(270.11deg, #363b59 0.09%, #42486a 99.92%);
  159. box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.12), inset -1px -1px 2px rgba(171, 171, 171, 0.12);
  160. border-radius: 21px;
  161. }
  162. /* 使用after伪元素制作四周凹陷效果 */
  163. .container .search .input_out:after {
  164. content: "";
  165. position: absolute;
  166. width: 407px;
  167. height: 64px;
  168. top: 3px;
  169. left: 3px;
  170. background: linear-gradient(270.11deg, #363b59 0.09%, #42486a 99.92%);
  171. box-shadow: 1px 1px 2px rgba(130, 130, 130, 0.25), -1px -1px 1px rgba(170, 170, 170, 0.12);
  172. border-radius: 18px;
  173. }
  174. /* 使用before伪元素制作渐变边框填充四周凹陷区域 */
  175. .container .search .input_out:before {
  176. content: '';
  177. position: absolute;
  178. width: 413px;
  179. height: 70px;
  180. left: 0px;
  181. top: 0px;
  182. background: linear-gradient(to right, #5360d7, rgba(0, 0, 0, 0));
  183. border-radius: 18px;
  184. }
  185. .container .search .input_out .fa {
  186. position: absolute;
  187. left: 20px;
  188. top: 22px;
  189. font-size: 24px;
  190. color: #fff;
  191. z-index: 2;
  192. }
  193. /* 真正的输入栏 */
  194. .container .search .input {
  195. width: 407px;
  196. height: 64px;
  197. outline: none;
  198. border: none;
  199. color: #797e9c;
  200. font-size: 18px;
  201. position: absolute;
  202. border-radius: 18px;
  203. padding: 0px 20px 0px 50px;
  204. background-color: transparent;
  205. }
  206. .container .files {
  207. position: absolute;
  208. top: 249px;
  209. height: 160px;
  210. width: 100%;
  211. display: flex;
  212. align-items: center;
  213. justify-content: space-evenly;
  214. z-index: 1;
  215. }
  216. .container .files .file_pupple {
  217. width: 184px;
  218. height: 154px;
  219. padding-left: 40px;
  220. /* 设置宽度,使用字体图标自适应(以下同理) */
  221. background-size: cover;
  222. /* 使用提前设计好的svg */
  223. background-image: url(svg/file_pupple.svg);
  224. display: flex;
  225. flex-direction: column;
  226. justify-content: center;
  227. }
  228. .container .files .file_orange {
  229. width: 184px;
  230. height: 154px;
  231. padding-left: 40px;
  232. background-size: cover;
  233. background-image: url(svg/file_orange.svg);
  234. display: flex;
  235. flex-direction: column;
  236. justify-content: center;
  237. }
  238. .container .files .file_icon_container {
  239. width: 39px;
  240. height: 39px;
  241. margin-top: 10px;
  242. background: #444b6d;
  243. box-shadow: inset -2px -2px 4px rgba(255, 255, 255, 0.25), inset 3px 3px 4px rgba(0, 0, 0, 0.25);
  244. border-radius: 12px;
  245. display: flex;
  246. justify-content: center;
  247. align-items: center;
  248. }
  249. .container .files .file_icon_container .file_icon {
  250. width: 15px;
  251. height: 19px;
  252. background-size: cover;
  253. background-image: url(svg/file_icon_orange.svg);
  254. }
  255. .container .files .file_icon_container .file_icon_blue {
  256. width: 15px;
  257. height: 19px;
  258. background-size: cover;
  259. background-image: url(svg/file_icon_blue.svg);
  260. }
  261. .container .files .name {
  262. margin-top: 10px;
  263. font-weight: 600;
  264. font-size: 18px;
  265. line-height: 21px;
  266. color: #9da1bf;
  267. }
  268. .container .files .folder {
  269. font-size: 12px;
  270. line-height: 14px;
  271. color: #747999;
  272. }
  273. .container .progress {
  274. position: absolute;
  275. top: 445px;
  276. height: 187px;
  277. width: 100%;
  278. display: flex;
  279. align-items: center;
  280. justify-content: space-evenly;
  281. z-index: 1;
  282. }
  283. .container .progress .left {
  284. position: relative;
  285. width: 192px;
  286. height: 192px;
  287. display: flex;
  288. justify-content: center;
  289. align-items: center;
  290. }
  291. /* 使用多个div分别制作圆形和进度条循环 */
  292. .container .progress .left .circle1 {
  293. position: absolute;
  294. width: 192px;
  295. height: 192px;
  296. background: #3a4263;
  297. box-shadow: inset -2px -2px 4px rgba(134, 134, 134, 0.25), inset 2px 2px 4px rgba(0, 0, 0, 0.25);
  298. border-radius: 50%;
  299. }
  300. .container .progress .left .circle2 {
  301. position: absolute;
  302. width: 187px;
  303. height: 187px;
  304. border-radius: 50%;
  305. background: #3a4263;
  306. box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.25), -2px -2px 2px rgba(149, 144, 144, 0.25);
  307. }
  308. .container .progress .left .circle4 {
  309. position: absolute;
  310. border-radius: 50%;
  311. width: 133px;
  312. height: 133px;
  313. background: #3a4263;
  314. box-shadow: 2px 2px 1px rgba(0, 0, 0, 0.25), -2px -2px 1px rgba(82, 88, 129, 0.2);
  315. }
  316. .container .progress .left .circle3 {
  317. position: absolute;
  318. border-radius: 50%;
  319. width: 138px;
  320. height: 138px;
  321. background: #3a4263;
  322. box-shadow: inset -2px -2px 1px rgba(134, 134, 134, 0.25), inset 2px 2px 1px rgba(0, 0, 0, 0.25);
  323. }
  324. .container .progress .left .circle5 {
  325. position: absolute;
  326. border-radius: 50%;
  327. width: 138px;
  328. height: 138px;
  329. border: 2.5px solid #47affd;
  330. /* 通过clip-path来制作填充圆环(之前的视频说过这个属性) */
  331. clip-path: polygon(50% 0%, 100% 0%, 100% 3600%, 50% 50%);
  332. }
  333. .container .progress .left .circle6 {
  334. position: absolute;
  335. width: 192px;
  336. height: 192px;
  337. border-radius: 50%;
  338. border: 2.5px solid #e5777a;
  339. transform: rotate(60deg);
  340. clip-path: polygon(50% 0%, 100% 0%, 100% 3600%, 50% 50%);
  341. }
  342. .container .progress .left .circle7 {
  343. position: absolute;
  344. width: 54px;
  345. height: 54px;
  346. border-radius: 50%;
  347. background: #464d71;
  348. box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.25), -2px -3px 4px rgba(255, 255, 255, 0.25);
  349. }
  350. .container .progress .right {
  351. display: flex;
  352. flex-direction: column;
  353. }
  354. .container .progress .right .margin {
  355. margin-top: 40px;
  356. }
  357. .container .progress .right .used {
  358. font-size: 14px;
  359. line-height: 16px;
  360. color: #9da1bf;
  361. }
  362. .container .progress .right .line {
  363. display: flex;
  364. align-items: center;
  365. }
  366. .container .progress .right .line .toggle {
  367. margin-right: 6px;
  368. }
  369. .container .progress .right .line .toggle .big {
  370. display: flex;
  371. justify-content: center;
  372. align-items: center;
  373. width: 13px;
  374. height: 13px;
  375. border-radius: 50%;
  376. background: #e5777a;
  377. }
  378. .container .progress .right .line .toggle .small {
  379. width: 5px;
  380. height: 5px;
  381. border-radius: 50%;
  382. background: #3b486a;
  383. }
  384. .container .progress .right .line .toggle .blue {
  385. background: #47affd;
  386. }
  387. .container .progress .right .line .text {
  388. font-size: 18px;
  389. line-height: 21px;
  390. color: #747999;
  391. }
  392. .container .items {
  393. position: absolute;
  394. top: 673px;
  395. width: 100%;
  396. display: flex;
  397. flex-direction: column;
  398. align-items: center;
  399. justify-content: space-evenly;
  400. z-index: 1;
  401. overflow: hidden;
  402. }
  403. /* item 制作思路和上面的大体一致 */
  404. .container .items .item {
  405. width: 414px;
  406. height: 108px;
  407. box-shadow: 0px 6px 13px rgba(0, 0, 0, 0.25);
  408. border-radius: 21px;
  409. position: relative;
  410. margin-top: 34px;
  411. display: flex;
  412. align-items: center;
  413. }
  414. .container .items .item:after {
  415. content: "";
  416. position: absolute;
  417. width: 410px;
  418. height: 104px;
  419. left: 2px;
  420. top: 2px;
  421. border-radius: 21px;
  422. background: linear-gradient(270.11deg, #363b59 0.09%, #42486a 99.92%);
  423. cursor: pointer;
  424. z-index: 1;
  425. }
  426. .container .items .item .icon_container {
  427. margin-left: 26px;
  428. display: flex;
  429. align-items: center;
  430. justify-content: center;
  431. z-index: 2;
  432. width: 55px;
  433. height: 55px;
  434. background: linear-gradient(135deg, #323753 0%, #58608a 100%);
  435. box-shadow: 2px 4px 20px rgba(0, 0, 0, 0.25), -3px -2px 20px rgba(255, 255, 255, 0.25);
  436. border-radius: 13px;
  437. }
  438. .container .items .item .icon_container .icon {
  439. width: 18px;
  440. height: 18px;
  441. background-size: cover;
  442. background-image: url("svg/image_icon.svg");
  443. }
  444. .container .items .item .item_text {
  445. z-index: 2;
  446. display: flex;
  447. flex-direction: column;
  448. justify-content: center;
  449. margin-left: 24px;
  450. }
  451. .container .items .item .item_text .item_name {
  452. font-size: 24px;
  453. line-height: 28px;
  454. color: #9da1bf;
  455. }
  456. .container .items .item .item_text .num_item {
  457. font-size: 14px;
  458. line-height: 16px;
  459. color: #747999;
  460. }
  461. .container .items .item .fa {
  462. z-index: 2;
  463. position: absolute;
  464. right: 26px;
  465. font-size: 24px;
  466. color: #fff;
  467. }
  468. .container .items .item1 {
  469. background: linear-gradient(to right, #a67b60, #50577f);
  470. transition: all 0.6s;
  471. }
  472. .container .items .item1:hover {
  473. background: #a67b60;
  474. }
  475. .container .items .item2 {
  476. background: linear-gradient(to right, #4983be, #50577f);
  477. transition: all 0.6s;
  478. }
  479. .container .items .item2:hover {
  480. background: #4983be;
  481. }

图片资源

https://github.com/Libra11/CSS-EFFECT/tree/master/Main/file_manager/svg


欢迎加群讨论技术,1群:677373950(满了,可以加,但通过不了),2群:656732739

评价
这一世以无限游戏为使命!
排名
2
文章
634
粉丝
44
评论
93
docker中Sware集群与service
尘叶心繁 : 想学呀!我教你呀
一个bug让程序员走上法庭 索赔金额达400亿日元
叼着奶瓶逛酒吧 : 所以说做程序员也要懂点法律知识
.net core 塑形资源
剑轩 : 收藏收藏
映射AutoMapper
剑轩 : 好是好,这个对效率影响大不大哇,效率高不高
ASP.NET Core 服务注册生命周期
剑轩 : http://www.tnblog.net/aojiancc2/article/details/167
ICP备案 :渝ICP备18016597号-1
网站信息:2018-2025TNBLOG.NET
技术交流:群号656732739
联系我们:contact@tnblog.net
公网安备:50010702506256
欢迎加群交流技术