博客列表 >某商城列表和详情页

某商城列表和详情页

葡萄枝子
葡萄枝子原创
2021年11月19日 23:38:51504浏览

某商城列表和详情页

css核心样式

  1. base.css
  1. @charset "utf-8";
  2. /*
  3. 重置浏览器样式
  4. */
  5. body, div, section, ul, ol, li, h1, h2, h3, h4, h5, h6, form, input, select, textarea {
  6. margin: 0;
  7. padding: 0;
  8. }
  9. div, button, input, select, textarea {
  10. font: 12px "微软雅黑", "宋体", "arial", "sans-serif";
  11. }
  12. ul, ol {
  13. list-style: none;
  14. }
  15. h1, h2, h3, h4, h5, h6 {
  16. font-size: 100%;
  17. font-weight: 500;
  18. }
  19. a {
  20. color: var(--fontColor);
  21. text-decoration: none;
  22. font-size: 14px;
  23. }
  24. a:hover {
  25. text-decoration: underline;
  26. }
  27. /*
  28. 颜色变量
  29. */
  30. :root {
  31. --fontIcon120: rgb(120, 0, 0);
  32. --bgColor: #90D7EC;
  33. --colorBlack: black;
  34. --bgWhite: white;
  35. --fontColorRed: #a10000;
  36. --fontColor: #262626;
  37. --container: 1200px;
  38. --container-full: 100%;
  39. --borderColor: #DBDBDB;
  40. --backgroundColor: #f4f4f4;
  41. --borderSmColor: #d6d6d6;
  42. --hoverColor: #A10000;
  43. }
  1. eduwork.css
  1. @charset "utf-8";
  2. /*
  3. 伸缩盒
  4. */
  5. .d-flex {
  6. display: flex;
  7. }
  8. .d-inline-flex {
  9. display: inline-flex;
  10. }
  11. /*弹性流方向与换行*/
  12. .flex-column {
  13. flex-direction: column;
  14. }
  15. .flex-wrap {
  16. flex-wrap: wrap;
  17. }
  18. /*主轴对齐方式*/
  19. .justify-content-start {
  20. justify-content: flex-start;
  21. }
  22. .justify-content-center {
  23. justify-content: center;
  24. }
  25. .justify-content-end {
  26. justify-content: flex-end;
  27. }
  28. .justify-content-between {
  29. justify-content: space-between;
  30. }
  31. .justify-content-around {
  32. justify-content: space-around;
  33. }
  34. .justify-content-evenly {
  35. justify-content: space-evenly;
  36. }
  37. /*单行容器交叉轴对齐*/
  38. .align-items-start {
  39. align-items: flex-start;
  40. }
  41. .align-items-center {
  42. align-items: center;
  43. }
  44. .align-items-end {
  45. align-items: flex-end;
  46. }
  47. /*多行容器交叉轴对齐*/
  48. .algin-content-start {
  49. align-content: flex-start;
  50. }
  51. .align-content-center {
  52. align-content: center;
  53. }
  54. .align-content-end {
  55. align-content: flex-end;
  56. }
  57. .align-content-between {
  58. align-content: space-between;
  59. }
  60. .align-content-around {
  61. align-content: space-around;
  62. }
  63. .align-content-enenly {
  64. align-content: space-evenly;
  65. }
  66. /*项目增长比例*/
  67. .flex-grow1 {
  68. flex-grow: 1;
  69. }
  70. .flex-grow2 {
  71. flex-grow: 2;
  72. }
  73. .flex-grow3 {
  74. flex-grow: 3;
  75. }
  76. .flex-grow4 {
  77. flex-grow: 4;
  78. }
  79. /*项目收缩比例*/
  80. .flex-shrink1 {
  81. flex-shrink: 1;
  82. }
  83. .flex-shrink2 {
  84. flex-shrink: 3;
  85. }
  86. .flex-shrink3 {
  87. flex-shrink: 3;
  88. }
  89. .flex-shrink4 {
  90. flex-shrink: 4;
  91. }
  92. /*项目宽度*/
  93. .flex-basis5 {
  94. flex-basis: 5%;
  95. }
  96. .flex-basis10 {
  97. flex-basis: 10%;
  98. }
  99. .flex-basis15 {
  100. flex-basis: 15%;
  101. }
  102. .flex-basis20 {
  103. flex-basis: 20%;
  104. }
  105. .flex-basis25 {
  106. flex-basis: 25%;
  107. }
  108. .flex-basis30 {
  109. flex-basis: 30%;
  110. }
  111. .flex-basis35 {
  112. flex-basis: 35%;
  113. }
  114. .flex-basis40 {
  115. flex-basis: 40%;
  116. }
  117. .flex-basis45 {
  118. flex-basis: 45%;
  119. }
  120. .flex-basis50 {
  121. flex-basis: 50%;
  122. }
  123. .flex-basis55 {
  124. flex-basis: 55%;
  125. }
  126. .flex-basis60 {
  127. flex-basis: 60%;
  128. }
  129. .flex-basis65 {
  130. flex-basis: 65%;
  131. }
  132. .flex-basis70 {
  133. flex-basis: 70%;
  134. }
  135. .flex-basis75 {
  136. flex-basis: 75%;
  137. }
  138. .flex-basis80 {
  139. flex-basis: 80%;
  140. }
  141. .flex-basis85 {
  142. flex-basis: 85%;
  143. }
  144. .flex-basis90 {
  145. flex-basis: 90%;
  146. }
  147. .flex-basis95 {
  148. flex-basis: 95%;
  149. }
  150. .flex-basis100 {
  151. flex-basis: 100%;
  152. }
  153. /*
  154. 边框
  155. */
  156. .border-box {
  157. box-sizing: border-box;
  158. }
  159. .border {
  160. border: 1px solid var(--borderColor);
  161. }
  162. .border2 {
  163. border: 2px solid var(--borderColor);
  164. }
  165. .border-top {
  166. border-top: 1px solid var(--borderColor);
  167. }
  168. .border-right {
  169. border-right: 1px solid var(--borderColor);
  170. }
  171. .border-bottom {
  172. border-bottom: 1px solid var(--borderColor);
  173. }
  174. .border-left {
  175. border-left: 1px solid var(--borderColor);
  176. }
  177. /*去边框*/
  178. .border-0 {
  179. border: none !important;
  180. outline: none;
  181. }
  182. .border-top-0 {
  183. border-top: none !important;
  184. }
  185. .border-right-0 {
  186. border-right: none !important;
  187. }
  188. .border-bottom-0 {
  189. border-bottom: none !important;
  190. }
  191. .border-left-0 {
  192. border-left: none !important;
  193. }
  194. /*边框样式*/
  195. .border-dashed {
  196. border-style: dashed;
  197. }
  198. .border-top-dashed {
  199. border-top-style: dashed;
  200. }
  201. .border-right-dashed {
  202. border-right-style: dashed;
  203. }
  204. .border-bottom-dashed {
  205. border-bottom-style: dashed;
  206. }
  207. .border-left-dashed {
  208. border-left-style: dashed;
  209. }
  210. /*圆角*/
  211. .border-radius-5 {
  212. border-radius: 5px;
  213. }
  214. .border-top-left-radius-5 {
  215. border-top-left-radius: 5px;
  216. }
  217. .border-top-right-radius-5 {
  218. border-top-right-radius: 5px;
  219. }
  220. .border-bottom-left-radius-5 {
  221. border-bottom-left-radius: 5px;
  222. }
  223. .border-bottom-right-radius-5 {
  224. border-bottom-right-radius: 5px;
  225. }
  226. .border-radius-10 {
  227. border-radius: 10px;
  228. }
  229. .border-top-left-radius-10 {
  230. border-top-left-radius: 10px;
  231. }
  232. .border-top-right-radius-10 {
  233. border-top-right-radius: 10px;
  234. }
  235. .border-bottom-left-radius-10 {
  236. border-bottom-left-radius: 10px;
  237. }
  238. .border-bottom-right-radius-10 {
  239. border-bottom-right-radius: 10px;
  240. }
  241. /*
  242. 外边距
  243. */
  244. .m-auto {
  245. margin-top: 0;
  246. margin-bottom: 0;
  247. margin-left: auto;
  248. margin-right: auto;
  249. }
  250. .m-0 {
  251. margin-top: 0;
  252. margin-right: 0;
  253. margin-bottom: 0;
  254. margin-left: 0;
  255. }
  256. .m-1 {
  257. margin-top: 5px;
  258. margin-right: 5px;
  259. margin-bottom: 5px;
  260. margin-left: 5px;
  261. }
  262. .m-2 {
  263. margin-top: 10px;
  264. margin-right: 10px;
  265. margin-bottom: 10px;
  266. margin-left: 10px;
  267. }
  268. .m-3 {
  269. margin-top: 15px;
  270. margin-right: 15px;
  271. margin-bottom: 15px;
  272. margin-left: 15px;
  273. }
  274. .m-4 {
  275. margin-top: 20px;
  276. margin-right: 20px;
  277. margin-bottom: 20px;
  278. margin-left: 20px;
  279. }
  280. /*上外边距*/
  281. .mt-0 {
  282. margin-top: 0;
  283. }
  284. .mt-1 {
  285. margin-top: 5px;
  286. }
  287. .mt-2 {
  288. margin-top: 10px;
  289. }
  290. .mt-3 {
  291. margin-top: 15px;
  292. }
  293. .mt-4 {
  294. margin-top: 20px;
  295. }
  296. /*右外边距*/
  297. .mr-0 {
  298. margin-right: 0;
  299. }
  300. .mr-1 {
  301. margin-right: 5px;
  302. }
  303. .mr-2 {
  304. margin-right: 10px;
  305. }
  306. .mr-3 {
  307. margin-right: 15px;
  308. }
  309. .mr-4 {
  310. margin-right: 20px;
  311. }
  312. /*下外边距*/
  313. .mb-0 {
  314. margin-bottom: 0;
  315. }
  316. .mb-1 {
  317. margin-bottom: 5px;
  318. }
  319. .mb-2 {
  320. margin-bottom: 10px;
  321. }
  322. .mb-3 {
  323. margin-bottom: 15px;
  324. }
  325. .mb-4 {
  326. margin-bottom: 20px;
  327. }
  328. /*左外边距*/
  329. .ml-0 {
  330. margin-left: 0;
  331. }
  332. .ml-1 {
  333. margin-left: 5px;
  334. }
  335. .ml-2 {
  336. margin-left: 10px;
  337. }
  338. .ml-3 {
  339. margin-left: 15px;
  340. }
  341. .ml-4 {
  342. margin-left: 20px;
  343. }
  344. /*左右外边距*/
  345. .mx-0 {
  346. margin-left: 0;
  347. margin-right: 0;
  348. }
  349. .mx-1 {
  350. margin-left: 5px;
  351. margin-right: 5px;
  352. }
  353. .mx-2 {
  354. margin-left: 10px;
  355. margin-right: 10px;
  356. }
  357. .mx-3 {
  358. margin-left: 15px;
  359. margin-right: 15px;
  360. }
  361. .mx-4 {
  362. margin-left: 20px;
  363. margin-right: 20px;
  364. }
  365. /*上下外边距*/
  366. .my-0 {
  367. margin-top: 0;
  368. margin-bottom: 0;
  369. }
  370. .my-1 {
  371. margin-top: 5px;
  372. margin-bottom: 5px;
  373. }
  374. .my-2 {
  375. margin-top: 10px;
  376. margin-bottom: 10px;
  377. }
  378. .my-3 {
  379. margin-top: 15px;
  380. margin-bottom: 15px;
  381. }
  382. .my-4 {
  383. margin-top: 20px;
  384. margin-bottom: 20px;
  385. }
  386. /*
  387. 内边距
  388. */
  389. .p-0 {
  390. padding-top: 0;
  391. padding-right: 0;
  392. padding-bottom: 0;
  393. padding-left: 0;
  394. }
  395. .p-1 {
  396. padding-top: 5px;
  397. padding-right: 5px;
  398. padding-bottom: 5px;
  399. padding-left: 5px;
  400. }
  401. .p-2 {
  402. padding-top: 10px;
  403. padding-right: 10px;
  404. padding-bottom: 10px;
  405. padding-left: 10px;
  406. }
  407. .p-3 {
  408. padding-top: 15px;
  409. padding-right: 15px;
  410. padding-bottom: 15px;
  411. padding-left: 15px;
  412. }
  413. .p-4 {
  414. padding-top: 20px;
  415. padding-right: 20px;
  416. padding-bottom: 20px;
  417. padding-left: 20px;
  418. }
  419. /*上内边距*/
  420. .pt-0 {
  421. padding-top: 0;
  422. }
  423. .pt-1 {
  424. padding-top: 5px;
  425. }
  426. .pt-2 {
  427. padding-top: 10px;
  428. }
  429. .pt-3 {
  430. padding-top: 15px;
  431. }
  432. .pt-4 {
  433. padding-top: 20px;
  434. }
  435. /*右内边距*/
  436. .pr-0 {
  437. padding-right: 0;
  438. }
  439. .pr-1 {
  440. padding-right: 5px;
  441. }
  442. .pr-2 {
  443. padding-right: 10px;
  444. }
  445. .pr-3 {
  446. padding-right: 15px;
  447. }
  448. .pr-4 {
  449. padding-right: 20px;
  450. }
  451. /*下内边距*/
  452. .pb-0 {
  453. padding-bottom: 0;
  454. }
  455. .pb-1 {
  456. padding-bottom: 5px;
  457. }
  458. .pb-2 {
  459. padding-bottom: 10px;
  460. }
  461. .pb-3 {
  462. padding-bottom: 15px;
  463. }
  464. .pb-4 {
  465. padding-bottom: 20px;
  466. }
  467. /*左内边距*/
  468. .pl-0 {
  469. padding-left: 0;
  470. }
  471. .pl-1 {
  472. padding-left: 5px;
  473. }
  474. .pl-2 {
  475. padding-left: 10px;
  476. }
  477. .pl-3 {
  478. padding-left: 15px;
  479. }
  480. .pl-4 {
  481. padding-left: 20px;
  482. }
  483. /*左右内边距*/
  484. .px-0 {
  485. padding-left: 0;
  486. padding-right: 0;
  487. }
  488. .px-1 {
  489. padding-left: 5px;
  490. padding-right: 5px;
  491. }
  492. .px-2 {
  493. padding-left: 10px;
  494. padding-right: 10px;
  495. }
  496. .px-3 {
  497. padding-left: 15px;
  498. padding-right: 15px;
  499. }
  500. .px-4 {
  501. padding-left: 20px;
  502. padding-right: 20px;
  503. }
  504. /*上下内边距*/
  505. .py-0 {
  506. padding-top: 0;
  507. padding-bottom: 0;
  508. }
  509. .py-1 {
  510. padding-top: 5px;
  511. padding-bottom: 5px;
  512. }
  513. .py-2 {
  514. padding-top: 10px;
  515. padding-bottom: 10px;
  516. }
  517. .py-3 {
  518. padding-top: 15px;
  519. padding-bottom: 15px;
  520. }
  521. .py-4 {
  522. padding-top: 20px;
  523. padding-bottom: 20px;
  524. }
  525. /*
  526. 宽高
  527. */
  528. .w-5 {
  529. width: 5%;
  530. }
  531. .w-10 {
  532. width: 10%;
  533. }
  534. .w-15 {
  535. width: 15%;
  536. }
  537. .w-20 {
  538. width: 20%;
  539. }
  540. .w-25 {
  541. width: 25%;
  542. }
  543. .w-30 {
  544. width: 30%;
  545. }
  546. .w-35 {
  547. width: 35%;
  548. }
  549. .w-40 {
  550. width: 40%;
  551. }
  552. .w-45 {
  553. width: 45%;
  554. }
  555. .w-50 {
  556. width: 50%;
  557. }
  558. .w-55 {
  559. width: 55%;
  560. }
  561. .w-60 {
  562. width: 60%;
  563. }
  564. .w-65 {
  565. width: 65%;
  566. }
  567. .w-70 {
  568. width: 70%;
  569. }
  570. .w-75 {
  571. width: 75%;
  572. }
  573. .w-80 {
  574. width: 80%;
  575. }
  576. .w-85 {
  577. width: 85%;
  578. }
  579. .w-90 {
  580. width: 90%;
  581. }
  582. .w-95 {
  583. width: 95%;
  584. }
  585. .w-100 {
  586. width: 100%;
  587. }
  588. .w-200 {
  589. width: 200%;
  590. }
  591. .w-300 {
  592. width: 300%;
  593. }
  594. .h-5 {
  595. height: 5%;
  596. }
  597. .h-10 {
  598. height: 10%;
  599. }
  600. .h-15 {
  601. height: 15%;
  602. }
  603. .h-20 {
  604. height: 20%;
  605. }
  606. .h-100 {
  607. height: 100%;
  608. }
  609. .h-200 {
  610. height: 200%;
  611. }
  612. .h-300 {
  613. height: 300%;
  614. }
  615. .w-1px {
  616. width: 1px
  617. }
  618. .w-2px {
  619. width: 2px;
  620. }
  621. .w-3px {
  622. width: 3px;
  623. }
  624. .w-5px {
  625. width: 5px;
  626. }
  627. .w-10px {
  628. width: 10px;
  629. }
  630. .w-15px {
  631. width: 15px
  632. }
  633. .w-20px {
  634. width: 20px;
  635. }
  636. .w-25px {
  637. width: 25px;
  638. }
  639. .h-1px {
  640. height: 1px;
  641. }
  642. .h-2px {
  643. height: 2px;
  644. }
  645. .h-3px {
  646. height: 3px;
  647. }
  648. .h-5px {
  649. height: 5px;
  650. }
  651. .h-10px {
  652. height: 10px;
  653. }
  654. .h-15px {
  655. height: 15px;
  656. }
  657. .h-20px {
  658. height: 20px;
  659. }
  660. .h-25px {
  661. height: 25px;
  662. }
  663. /*
  664. 定位
  665. */
  666. .position-absolute {
  667. position: absolute;
  668. }
  669. .position-relative {
  670. position: relative;
  671. }
  672. .position-fixed {
  673. position: fixed;
  674. }
  675. .fl {
  676. float: left;
  677. }
  678. .fr {
  679. float: right;
  680. }
  681. .left-0 {
  682. left: 0;
  683. }
  684. .left-5 {
  685. left: 5px;
  686. }
  687. .left-10 {
  688. left: 10px;
  689. }
  690. .left-15 {
  691. left: 15px;
  692. }
  693. .left-20 {
  694. left: 20px;
  695. }
  696. .right-0 {
  697. left: 0;
  698. }
  699. .right-5 {
  700. right: 5px;
  701. }
  702. .right-10 {
  703. right: 10px;
  704. }
  705. .right-15 {
  706. right: 15px;
  707. }
  708. .right-20 {
  709. right: 20px;
  710. }
  711. .top-0 {
  712. top: 0;
  713. }
  714. .top-5 {
  715. top: 5px;
  716. }
  717. .top-10 {
  718. top: 10px;
  719. }
  720. .top-15 {
  721. top: 15px;
  722. }
  723. .top-20 {
  724. top: 20px;
  725. }
  726. .bottom-0 {
  727. bottom: 0;
  728. }
  729. .bottom-5 {
  730. bottom: 5px;
  731. }
  732. .bottom-10 {
  733. bottom: 10px;
  734. }
  735. .bottom-15 {
  736. bottom: 15px;
  737. }
  738. .bottom-20 {
  739. bottom: 20px;
  740. }
  741. .clear {
  742. clear: both;
  743. display: block;
  744. font-size: 0;
  745. height: 0;
  746. line-height: 0;
  747. overflow: hidden;
  748. }
  749. .z-index1 {
  750. z-index: 1;
  751. }
  752. .z-index2 {
  753. z-index: 2;
  754. }
  755. .z-index100 {
  756. z-index: 100;
  757. }
  758. /*文本*/
  759. .fontSize12 {
  760. font-size: 12px;
  761. }
  762. .fontSize14 {
  763. font-size: 14px;
  764. }
  765. .fontSize16 {
  766. font-size: 16px;
  767. }
  768. .fontSize18 {
  769. font-size: 18px;
  770. }
  771. .fontSize20 {
  772. font-size: 20px;
  773. }
  774. .fontSize22 {
  775. font-size: 22px;
  776. }
  777. .fontSize24 {
  778. font-size: 24px;
  779. }
  780. .fontSize26 {
  781. font-size: 26px;
  782. }
  783. .fontSize28 {
  784. font-size: 28px;
  785. }
  786. .fontSize30 {
  787. font-size: 30px;
  788. }
  789. .fontSize50 {
  790. font-size: 50px !important;
  791. }
  792. .bold {
  793. font-weight: bold;
  794. }
  795. .lighter {
  796. font-weight: lighter;
  797. }
  798. .text-left {
  799. text-align: left;
  800. }
  801. .text-center {
  802. text-align: center;
  803. }
  804. .text-right {
  805. text-align: right;
  806. }
  807. /*
  808. 显隐
  809. */
  810. .show, .d-block {
  811. display: block;
  812. }
  813. .hide, .d-none {
  814. display: none;
  815. }
  816. .d-inline {
  817. display: inline;
  818. }
  819. .d-inline-block {
  820. display: inline-block;
  821. }
  822. .visibility-hide {
  823. visibility: hidden;
  824. }
  825. .visibility-visible {
  826. visibility: visible;
  827. }
  828. .overflow-hidden {
  829. overflow: hidden;
  830. }
  831. .overflow-x-hidden {
  832. overflow-x: hidden;
  833. }
  834. .overflow-y-hidden {
  835. overflow-y: hidden;
  836. }
  837. /*其它*/
  838. .container {
  839. width: var(--container);
  840. margin: 10px auto;
  841. }
  842. .container-full {
  843. width: var(--container-full);
  844. }
  845. .bg-transparent {
  846. background: transparent;
  847. }
  848. .border-dark {
  849. border-color: var(--fontColorRed);
  850. }
  851. img {
  852. width: 100%;
  853. vertical-align: center;
  854. }
  855. .textWhite {
  856. color: white;
  857. }
  858. .textBlack {
  859. color: var(--colorBlack);
  860. }
  861. .textRed {
  862. color: var(--fontColorRed);
  863. }
  864. .textColor {
  865. color: var(--fontColor);
  866. }
  867. .fontIcon120 {
  868. color: var(--fontIcon120);
  869. }
  870. .bgColor {
  871. background-color: var(--backgroundColor);
  872. }
  873. .bgCover {
  874. background-color: var(--bgColor);
  875. }
  876. .bgWhite {
  877. background-color: var(--bgWhite);
  878. }
  879. .bgBlack {
  880. background-color: var(--colorBlack);
  881. }
  882. .bgRed {
  883. background-color: #A10000;
  884. }
  885. .bgDb {
  886. background-color: #dbdbdb;
  887. }
  888. .borderSmColor {
  889. border-color: var(--borderSmColor);
  890. }
  891. .cursor:hover {
  892. cursor: pointer;
  893. }
  894. .hover:hover {
  895. color: var(--hoverColor);
  896. }
  897. .hoverBgRed:hover {
  898. background-color: #A10000;
  899. }
  900. .hoverWhite:hover {
  901. color: white;
  902. }
  903. .hoverShadow:hover {
  904. box-shadow: 0 0 2px 1px #ccc;
  905. }
  906. .hoverOverflow:hover {
  907. overflow: visible;
  908. }
  909. .hoverVisibility {
  910. visibility: visible;
  911. }
  912. .transition1s {
  913. transition: all 1s ease;
  914. }
  915. .decoration-none, .decoration-none:hover {
  916. text-decoration: none;
  917. }
  1. layout.css
  1. @charset "utf-8";
  2. /*导航*/
  3. nav > ul > li::after {
  4. content: "";
  5. display: block;
  6. position: relative;
  7. height: 2px;
  8. top: 10px;
  9. background: #A10000;
  10. transform: scaleX(0);
  11. transition: all .3s;
  12. }
  13. nav > ul > li:hover::after {
  14. transform: scaleX(1.3);
  15. }
  16. nav > ul > li > ul {
  17. visibility: hidden;
  18. }
  19. nav > ul > li:hover ul {
  20. visibility: visible;
  21. }
  22. nav > ul > li a:hover {
  23. text-decoration: none;
  24. }
  25. nav > ul > li > ul {
  26. background-color: rgba(255, 255, 255, .3);
  27. }
  28. /*顶部banner*/
  29. .banner > div {
  30. animation: banner 15s infinite;
  31. }
  32. .banner > div:hover {
  33. animation-play-state: paused;
  34. }
  35. @keyframes banner {
  36. 33.33% {
  37. margin-left: -100%;
  38. }
  39. 66.66% {
  40. margin-left: -200%;
  41. }
  42. }
  43. /*侧栏*/
  44. aside {
  45. /*top: calc(50% - 120px);*/
  46. top: 50%;
  47. transform: translate(0, -50%);
  48. }
  49. aside > span:hover {
  50. background-color: var(--hoverColor);
  51. color: white;
  52. }
  53. aside > span:hover::before {
  54. font-size: 12px;
  55. }
  56. aside > span:first-child:hover::before {
  57. content: "我的购物";
  58. }
  59. aside > span:nth-child(2):hover::before {
  60. content: "搜索商品";
  61. }
  62. aside > span:nth-child(3):hover::before {
  63. content: "个人中心";
  64. }
  65. aside > span:last-child:hover::before {
  66. content: "扫码关注";
  67. }
  68. /*导航图文*/
  69. .nav-t {
  70. width: 820px;
  71. margin: 0 auto;
  72. position: relative;
  73. top: -50px;
  74. background: white url("/img/bg.jpg") repeat-x bottom;
  75. }
  76. .nav-t > a > img {
  77. transition: all 1s;
  78. }
  79. .nav-t > a > img:hover {
  80. transform: scale(1.1);
  81. }
  82. /*卡片*/
  83. .w-365px {
  84. width: 365px;
  85. }
  86. .h-365px {
  87. height: 365px;
  88. }
  89. .w-268px {
  90. width: 268px;
  91. }
  92. .h-268px {
  93. height: 268px;
  94. }
  95. .card-cover {
  96. position: relative;
  97. overflow: hidden;
  98. }
  99. .card-cover > .cover-item {
  100. position: absolute;
  101. background-color: var(--bgColor);
  102. border-radius: 5px 5px 0 0;
  103. opacity: .2;
  104. transition: all .3s;
  105. }
  106. .card-cover > .cover-item:first-of-type {
  107. top: -100%;
  108. left: -100%;
  109. }
  110. .card-cover > .cover-item:last-of-type {
  111. top: 100%;
  112. left: 100%;
  113. }
  114. .card-cover:hover > .cover-item {
  115. top: 0;
  116. left: 0;
  117. }
  118. /*其它*/
  119. .w-53px {
  120. width: 53px;
  121. }
  122. .color777 {
  123. color: #777;
  124. }

商城列表页

  1. list.html
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>Ewshop - list</title>
  6. <link rel="stylesheet" href="./css/base.css"/>
  7. <link rel="stylesheet" href="./css/eduwork.css"/>
  8. <link rel="stylesheet" href="./css/layout.css">
  9. <link rel="stylesheet" href="./css/list.css">
  10. <link rel="stylesheet" href="//at.alicdn.com/t/font_2946534_nvos7wgzrcf.css">
  11. <link rel="icon" href="./img/icon.png"/>
  12. </head>
  13. <body>
  14. <!--头部-->
  15. <header class="container d-flex justify-content-between">
  16. <div class="border-0"><img src="./img/logo.png" alt="logo"></div>
  17. <div class="d-flex justify-content-center align-items-center">
  18. <a href="" title="登录" class="fontSize14">登录</a>
  19. <span class="mx-1">|</span>
  20. <a href="" title="注册" class="fontSize14">注册</a>
  21. <form class="d-flex border-bottom py-1 px-2 mx-2" action="">
  22. <input type="text" name="search" placeholder="热门搜索:细说php" class="border-0"/>
  23. <button class="border-0 bg-transparent iconfont icon-sousuo fontSize20 fontIcon120"></button>
  24. </form>
  25. <div class="d-flex justify-content-center align-items-center font">
  26. <i class="iconfont icon-200yonghu_yonghu fontSize20 fontIcon120"></i>
  27. <i class="iconfont icon-erweima fontIcon120 px-2"></i>
  28. <i class="iconfont icon-gouwuchekong fontIcon120"></i>
  29. </div>
  30. </div>
  31. </header>
  32. <!--导航-->
  33. <nav class="bcontainer-full">
  34. <ul class="d-flex justify-content-center m-auto">
  35. <li class="mx-4 px-2 py-2"><a href="#" title="" class="hover">首页</a></li>
  36. <li class="mx-4 px-2 py-2">
  37. <a href="#" title="" class="hover">编程图书</a>
  38. <ul class="position-absolute d-flex justify-content-center w-100 left-0 my-2 py-3">
  39. <li class="mx-4 px-4 py-2"><a href="#" title="" class="textWhite bold hover">细说php</a>
  40. </li>
  41. <li class="mx-4 px-4 py-2"><a href="#" title="" class="textWhite bold hover">细说php</a>
  42. </li>
  43. <li class="mx-4 px-4 py-2"><a href="#" title="" class="textWhite bold hover">细说php</a>
  44. </li>
  45. <li class="mx-4 px-4 py-2"><a href="#" title="" class="textWhite bold hover">细说php</a>
  46. </li>
  47. </ul>
  48. </li>
  49. <li class="mx-4 px-2 py-2"><a href="#" title="" class="hover">算法图书</a></li>
  50. <li class="mx-4 px-2 py-2"><a href="#" title="" class="hover">AI图书</a></li>
  51. <li class="mx-4 px-2 py-2"><a href="#" title="" class="hover">人工智能</a></li>
  52. </ul>
  53. </nav>
  54. <!--banner-->
  55. <section class="banner container-full overflow-hidden">
  56. <div class="d-flex w-300">
  57. <a href="" title="" class="d-block w-100"><img src="./img/001.jpeg" alt="" class="w-100"/></a>
  58. <a href="" title="" class="d-block w-100"><img src="./img/2.jpeg" alt="" class="w-100"/></a>
  59. <a href="" title="" class="d-block w-100"><img src="./img/3.jpeg" alt="" class="w-100"/></a>
  60. </div>
  61. </section>
  62. <!--侧栏-->
  63. <aside class="position-fixed right-10 d-flex flex-column jusify-content-between z-index100">
  64. <span class="border d-flex justify-content-center align-items-center w-25px h-25px p-3 my-1 cursor fontIcon120 bgDb iconfont icon-gouwuchekong"></span>
  65. <span class="border d-flex justify-content-center align-items-center w-25px h-25px p-3 my-1 cursor fontIcon120 bgDb iconfont icon-sousuo"></span>
  66. <span class="border d-flex justify-content-center align-items-center w-25px h-25px p-3 my-1 cursor fontIcon120 bgDb iconfont icon-200yonghu_yonghu"></span>
  67. <span class="border d-flex justify-content-center align-items-center w-25px h-25px p-3 my-1 cursor fontIcon120 bgDb iconfont icon-erweima"></span>
  68. </aside>
  69. <!--面包屑-->
  70. <section class="container-full py-1 border-bottom">
  71. <div class="container">
  72. <a href="" title="" class="fontSize12 color777">首页</a>
  73. <span class="mx-2">/</span>
  74. <a href="" title="" class="fontSize12 color777">编程书籍</a>
  75. <span class="mx-2">/</span>
  76. <span class="fontSize12">细说系列</span>
  77. </div>
  78. </section>
  79. <!--列表头部-->
  80. <section class="container-full border-bottom">
  81. <div class="container d-flex justify-content-between align-items-center">
  82. <h3 class="fontSize16 bold">细说系列</h3>
  83. <div class="w-200px h-40px border-box overflow-hidden hoverOverflow z-index2">
  84. <div class="w-200px h-40px border d-flex justify-content-between align-items-center border-box px-2 cursor">
  85. <span>排序方式</span>
  86. <span class="iconfont icon-xiajiantou"></span>
  87. </div>
  88. <div class="w-200px h-40px line-height-40px border border-top-0 border-box px-2 cursor bgWhite hoverBgRed hoverWhite">
  89. <span>新品上市</span>
  90. </div>
  91. <div class="w-200px h-40px line-height-40px border border-top-0 border-box px-2 cursor bgWhite hoverBgRed hoverWhite">
  92. <span>销量从高到低</span>
  93. </div>
  94. <div class="w-200px h-40px line-height-40px border border-top-0 border-box px-2 cursor bgWhite hoverBgRed hoverWhite">
  95. <span>销量从低到高</span>
  96. </div>
  97. <div class="w-200px h-40px line-height-40px border border-top-0 border-box px-2 cursor bgWhite hoverBgRed hoverWhite">
  98. <span>价格从高到低</span>
  99. </div>
  100. <div class="w-200px h-40px line-height-40px border border-top-0 border-box px-2 cursor bgWhite hoverBgRed hoverWhite">
  101. <span>价格从低到高</span>
  102. </div>
  103. </div>
  104. </div>
  105. </section>
  106. <!--列表主体-->
  107. <section class="container d-flex justify-content-between pt-4">
  108. <a href="" title="" class="d-block decoration-none">
  109. <img src="./img/pro01.jpg" alt="">
  110. <p class="fontSize12">【细说】细说PHP</p>
  111. <p class="textRed">¥ 159.00</p>
  112. </a>
  113. <a href="" title="" class="d-block decoration-none">
  114. <img src="./img/pro01.jpg" alt="">
  115. <p class="fontSize12">【细说】细说PHP</p>
  116. <p class="textRed">¥ 159.00</p>
  117. </a>
  118. <a href="" title="" class="d-block decoration-none">
  119. <img src="./img/pro01.jpg" alt="">
  120. <p class="fontSize12">【细说】细说PHP</p>
  121. <p class="textRed">¥ 159.00</p>
  122. </a>
  123. <a href="" title="" class="d-block decoration-none">
  124. <img src="./img/pro01.jpg" alt="">
  125. <p class="fontSize12">【细说】细说PHP</p>
  126. <p class="textRed">¥ 159.00</p>
  127. </a>
  128. </section>
  129. <!--底部-->
  130. <footer class="container-full border-top mt-4">
  131. <!--上部分-->
  132. <section class="container d-flex justify-content-around">
  133. <div class="d-flex align-items-center">
  134. <img src="./img/foot1.png" alt="" class="w-53px">
  135. <span class="ml-2 fontSize14">7天无理由退货</span>
  136. </div>
  137. <div class="border-right"></div>
  138. <div class="d-flex align-items-center">
  139. <img src="./img/foot2.png" alt="" class="w-53px">
  140. <span class="ml-2 fontSize14">15天免费换货</span>
  141. </div>
  142. <div class="border-right"></div>
  143. <div class="d-flex align-items-center">
  144. <img src="./img/foot3.png" alt="" class="w-53px">
  145. <span class="ml-2 fontSize14">满599包邮</span>
  146. </div>
  147. <div class="border-right"></div>
  148. <div class="d-flex align-items-center">
  149. <img src="./img/foot4.png" alt="" class="w-53px">
  150. <span class="ml-2 fontSize14">手机特色服务</span>
  151. </div>
  152. </section>
  153. <!--下部分-->
  154. <section class="p-4 bgBlack text-center textWhite">
  155. <div>最家家居©2013-2017公司版权所有 京ICP备080100-44备0000111000号</div>
  156. <div>违法和不良信息举报电话:400-800-8200,本网站所列数据,除特殊说明,所有数据均出自我司实验室测试</div>
  157. </section>
  158. </footer>
  159. </body>
  160. </html>
  1. list.css
  1. @charset "utf-8";
  2. /*列表页*/
  3. .w-200px {
  4. width: 200px;
  5. }
  6. .h-40px {
  7. height: 40px;
  8. }
  9. .line-height-40px {
  10. line-height: 40px;
  11. }

列表页

详情页

  1. info.html
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>Ewshop - info</title>
  6. <link rel="stylesheet" href="./css/base.css"/>
  7. <link rel="stylesheet" href="./css/eduwork.css"/>
  8. <link rel="stylesheet" href="./css/layout.css">
  9. <link rel="stylesheet" href="./css/info.css">
  10. <link rel="stylesheet" href="//at.alicdn.com/t/font_2946534_nvos7wgzrcf.css">
  11. <link rel="icon" href="./img/icon.png"/>
  12. </head>
  13. <body>
  14. <!--头部-->
  15. <header class="container d-flex justify-content-between">
  16. <div class="border-0"><img src="./img/logo.png" alt="logo"></div>
  17. <div class="d-flex justify-content-center align-items-center">
  18. <a href="" title="登录" class="fontSize14">登录</a>
  19. <span class="mx-1">|</span>
  20. <a href="" title="注册" class="fontSize14">注册</a>
  21. <form class="d-flex border-bottom py-1 px-2 mx-2" action="">
  22. <input type="text" name="search" placeholder="热门搜索:细说php" class="border-0"/>
  23. <button class="border-0 bg-transparent iconfont icon-sousuo fontSize20 fontIcon120"></button>
  24. </form>
  25. <div class="d-flex justify-content-center align-items-center font">
  26. <i class="iconfont icon-200yonghu_yonghu fontSize20 fontIcon120"></i>
  27. <i class="iconfont icon-erweima fontIcon120 px-2"></i>
  28. <i class="iconfont icon-gouwuchekong fontIcon120"></i>
  29. </div>
  30. </div>
  31. </header>
  32. <!--导航-->
  33. <nav class="bcontainer-full">
  34. <ul class="d-flex justify-content-center m-auto">
  35. <li class="mx-4 px-2 py-2"><a href="#" title="" class="hover">首页</a></li>
  36. <li class="mx-4 px-2 py-2">
  37. <a href="#" title="" class="hover">编程图书</a>
  38. <ul class="position-absolute d-flex justify-content-center w-100 left-0 my-2 py-3">
  39. <li class="mx-4 px-4 py-2"><a href="#" title="" class="textWhite bold hover">细说php</a>
  40. </li>
  41. <li class="mx-4 px-4 py-2"><a href="#" title="" class="textWhite bold hover">细说php</a>
  42. </li>
  43. <li class="mx-4 px-4 py-2"><a href="#" title="" class="textWhite bold hover">细说php</a>
  44. </li>
  45. <li class="mx-4 px-4 py-2"><a href="#" title="" class="textWhite bold hover">细说php</a>
  46. </li>
  47. </ul>
  48. </li>
  49. <li class="mx-4 px-2 py-2"><a href="#" title="" class="hover">算法图书</a></li>
  50. <li class="mx-4 px-2 py-2"><a href="#" title="" class="hover">AI图书</a></li>
  51. <li class="mx-4 px-2 py-2"><a href="#" title="" class="hover">人工智能</a></li>
  52. </ul>
  53. </nav>
  54. <!--banner-->
  55. <section class="banner container-full overflow-hidden">
  56. <div class="d-flex w-300">
  57. <a href="" title="" class="d-block w-100"><img src="./img/001.jpeg" alt="" class="w-100"/></a>
  58. <a href="" title="" class="d-block w-100"><img src="./img/2.jpeg" alt="" class="w-100"/></a>
  59. <a href="" title="" class="d-block w-100"><img src="./img/3.jpeg" alt="" class="w-100"/></a>
  60. </div>
  61. </section>
  62. <!--侧栏-->
  63. <aside class="position-fixed right-10 d-flex flex-column jusify-content-between z-index100">
  64. <span class="border d-flex justify-content-center align-items-center w-25px h-25px p-3 my-1 cursor fontIcon120 bgDb iconfont icon-gouwuchekong"></span>
  65. <span class="border d-flex justify-content-center align-items-center w-25px h-25px p-3 my-1 cursor fontIcon120 bgDb iconfont icon-sousuo"></span>
  66. <span class="border d-flex justify-content-center align-items-center w-25px h-25px p-3 my-1 cursor fontIcon120 bgDb iconfont icon-200yonghu_yonghu"></span>
  67. <span class="border d-flex justify-content-center align-items-center w-25px h-25px p-3 my-1 cursor fontIcon120 bgDb iconfont icon-erweima"></span>
  68. </aside>
  69. <!--面包屑-->
  70. <section class="container-full py-1 border-bottom">
  71. <div class="container">
  72. <a href="" title="" class="fontSize12 color777">首页</a>
  73. <span class="mx-2">/</span>
  74. <a href="" title="" class="fontSize12 color777">编程书籍</a>
  75. <span class="mx-2">/</span>
  76. <span class="fontSize12">细说系列</span>
  77. </div>
  78. </section>
  79. <!--内容详情-->
  80. <section class="container">
  81. <section class="d-flex mb-4 pt-4">
  82. <section class="flex-basis50">
  83. <div class="w-60"><img src="./img/proDet01_big.jpg" alt=""></div>
  84. <div class="d-flex w-60">
  85. <img src="./img/proDet01.jpg" alt="">
  86. <img src="./img/proDet01.jpg" alt="">
  87. <img src="./img/proDet01.jpg" alt="">
  88. <img src="./img/proDet01.jpg" alt="">
  89. </div>
  90. </section>
  91. <section class="flex-basis50">
  92. <div class="border-bottom pb-4">
  93. <h1 class="fontSize24">[细说] 细说PHP</h1>
  94. <p class="color777">【破损补寄】【适合放室内、卧室、书房、餐桌、办公室、客厅、电视柜等地方】【无理由退换货】【包邮】【白色现代简约花瓶】</p>
  95. <p class="textRed bold fontSize16">¥ 159.00</p>
  96. </div>
  97. <div class="border-bottom pb-4 my-4">
  98. <p>颜色分类</p>
  99. <p class="d-flex">
  100. <img src="./img/proDet01.jpg" alt="" class="w-50px mr-3">
  101. <img src="./img/proDet01.jpg" alt="" class="w-50px mr-3">
  102. <img src="./img/proDet01.jpg" alt="" class="w-50px mr-3">
  103. <img src="./img/proDet01.jpg" alt="" class="w-50px mr-3">
  104. </p>
  105. <p>数量 库存<span class="textRed">2000</span></p>
  106. <div class="d-flex mt-4 align-items-center align-items-center">
  107. <div class="border py-1 px-2 cursor">-</div>
  108. <div class="mx-2"><input type="text" value="1" size="1" class="border-0 text-center"></div>
  109. <div class="border py-1 px-2 cursor">+</div>
  110. </div>
  111. </div>
  112. <div class="mt-4 py-4 d-flex justify-content-between">
  113. <button class="bgRed border py-3 textWhite w-200px">立刻购买</button>
  114. <button class="bgWhite border py-3 w-200px">加入购物车</button>
  115. </div>
  116. </section>
  117. </section>
  118. <section class="mt-50px d-flex justify-content-between">
  119. <section class="flex-basis82">
  120. <div class="border-top border-bottom d-flex">
  121. <div class="px-3 py-2 border-bottom border-dark">商品详情</div>
  122. <div class="px-3 py-2">所有评价</div>
  123. </div>
  124. <div class="mt-4">
  125. <img src="./img/det01.jpg" alt="">
  126. <img src="./img/det01.jpg" alt="">
  127. <img src="./img/det01.jpg" alt="">
  128. <img src="./img/det01.jpg" alt="">
  129. <img src="./img/det01.jpg" alt="">
  130. </div>
  131. </section>
  132. <section class="flex-basis16">
  133. <div class="border">
  134. <div class="d-flex justify-content-center bgColor">
  135. <div class="px-3 py-2">为你推荐</div>
  136. </div>
  137. <div class="p-3">
  138. <img src="./img/see01.jpg" alt="">
  139. <p>【细说】细说PHP</p>
  140. <p>¥158.00</p>
  141. </div>
  142. <div class="p-3">
  143. <img src="./img/see01.jpg" alt="">
  144. <p>【细说】细说PHP</p>
  145. <p>¥158.00</p>
  146. </div>
  147. <div class="p-3">
  148. <img src="./img/see01.jpg" alt="">
  149. <p>【细说】细说PHP</p>
  150. <p>¥158.00</p>
  151. </div>
  152. <div class="p-3">
  153. <img src="./img/see01.jpg" alt="">
  154. <p>【细说】细说PHP</p>
  155. <p>¥158.00</p>
  156. </div>
  157. </div>
  158. </section>
  159. </section>
  160. </section>
  161. <!--猜你喜欢-->
  162. <section class="container-full bgfb py-4">
  163. <h3 class="text-center py-2">猜你喜欢</h3>
  164. <section class="d-flex justify-content-between">
  165. <a href="" title="" class="decoration-none text-center pl-4 d-flex align-items-center"><i class="iconfont icon-xiangzuojiantou fontSize50 opcity3"></i></a>
  166. <div class="container d-flex justify-content-around">
  167. <div>
  168. <img src="./img/like04.jpg" alt="">
  169. <p class="fontSize16">【细说】细说PHP</p>
  170. <p class="textRed fontSize16">¥158.00</p>
  171. </div>
  172. <div>
  173. <img src="./img/like04.jpg" alt="">
  174. <p class="fontSize16">【细说】细说PHP</p>
  175. <p class="textRed fontSize16">¥158.00</p>
  176. </div>
  177. <div>
  178. <img src="./img/like04.jpg" alt="">
  179. <p class="fontSize16">【细说】细说PHP</p>
  180. <p class="textRed fontSize16">¥158.00</p>
  181. </div>
  182. <div>
  183. <img src="./img/like04.jpg" alt="">
  184. <p class="fontSize16">【细说】细说PHP</p>
  185. <p class="textRed fontSize16">¥158.00</p>
  186. </div>
  187. </div>
  188. <a href="" title="" class="decoration-none text-center pr-4 d-flex align-items-center"><i class="iconfont icon-xiangyoujiantou fontSize50 opcity3"></i></a>
  189. </section>
  190. </section>
  191. <!--底部-->
  192. <footer class="container-full border-top mt-4">
  193. <!--上部分-->
  194. <section class="container d-flex justify-content-around">
  195. <div class="d-flex align-items-center">
  196. <img src="./img/foot1.png" alt="" class="w-53px">
  197. <span class="ml-2 fontSize14">7天无理由退货</span>
  198. </div>
  199. <div class="border-right"></div>
  200. <div class="d-flex align-items-center">
  201. <img src="./img/foot2.png" alt="" class="w-53px">
  202. <span class="ml-2 fontSize14">15天免费换货</span>
  203. </div>
  204. <div class="border-right"></div>
  205. <div class="d-flex align-items-center">
  206. <img src="./img/foot3.png" alt="" class="w-53px">
  207. <span class="ml-2 fontSize14">满599包邮</span>
  208. </div>
  209. <div class="border-right"></div>
  210. <div class="d-flex align-items-center">
  211. <img src="./img/foot4.png" alt="" class="w-53px">
  212. <span class="ml-2 fontSize14">手机特色服务</span>
  213. </div>
  214. </section>
  215. <!--下部分-->
  216. <section class="p-4 bgBlack text-center textWhite">
  217. <div>最家家居©2013-2017公司版权所有 京ICP备080100-44备0000111000号</div>
  218. <div>违法和不良信息举报电话:400-800-8200,本网站所列数据,除特殊说明,所有数据均出自我司实验室测试</div>
  219. </section>
  220. </footer>
  221. </body>
  222. </html>
  1. info.css
  1. @charset "utf-8";
  2. .w-50px {
  3. width: 50px;
  4. }
  5. .w-200px {
  6. width: 200px;
  7. }
  8. .mt-50px {
  9. margin-top: 50px;
  10. }
  11. .flex-basis82 {
  12. flex-basis: 82%;
  13. }
  14. .flex-basis16 {
  15. flex-basis: 16%;
  16. }
  17. .bgfb {
  18. background-color: #fbfbfb;
  19. }
  20. .opcity3 {
  21. opacity: .3;
  22. }

详情页

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