home.css 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657
  1. @media screen and (min-width: 100px) and (max-width: 768px) {
  2. /*==============首页主题====================*/
  3. .card {
  4. width: calc(100VW - 40px);
  5. margin: 0 0;
  6. padding: 0 20px;
  7. text-align: left;
  8. }
  9. .card .card-header {
  10. width: 100%;
  11. display: flex;
  12. line-height: 32px;
  13. }
  14. .card .card-header .card-title {
  15. text-align: left;
  16. display: inline-block;
  17. padding: 0;
  18. width: auto;
  19. margin: 0;
  20. font-size: 1.4em;
  21. font-weight: bold;
  22. color: #333333;
  23. }
  24. .card .card-header .cart-other {
  25. flex: 1;
  26. margin: 0;
  27. width: auto;
  28. text-align: right;
  29. vertical-align: middle;
  30. align-items: center;
  31. font-size: 12px;
  32. }
  33. .card .card-header .cart-other a {
  34. cursor: pointer;
  35. padding: 5px 15px;
  36. color: #666666;
  37. font-size: 1.2em;
  38. }
  39. .card .card-header .cart-other a:after {
  40. content: " >";
  41. }
  42. .card .card-des {
  43. margin: 5px 0 0 0;
  44. color: #666666;
  45. font-size: 1em;
  46. }
  47. .card .card-list {
  48. width: calc(100VW - 40px);
  49. display: flex;
  50. align-items: center; /* 确保文本和图片顶部对齐 */
  51. justify-content: space-between;
  52. flex-wrap: wrap;
  53. padding: 5px 0 0 0;
  54. margin-top: 15px;
  55. overflow: hidden;
  56. }
  57. .card .card-list .goods-info {
  58. width: calc(calc(100VW - 40px) / 3 - 20px); /* 三个卡片平分宽度,留出间隙 */
  59. /*margin-right: 10px;*/
  60. /*margin-bottom: 20px;*/
  61. text-align: center;
  62. }
  63. /* 隐藏 .card-list 中第六个元素之后的所有元素 */
  64. .card .card-list .goods-info:nth-child(n+7) {
  65. display: none;
  66. }
  67. /* 保证最后一列没有右边距 */
  68. .card .card-list div:nth-child(3n) {
  69. margin-right: 0;
  70. }
  71. /* 统一图片容器的高度 */
  72. .goods-info .goods-img {
  73. /*width: 100%;*/
  74. width: calc(33.33334VW - 33px);
  75. height: calc(44.4444VW - 44px);
  76. border-radius: calc(1VW);
  77. overflow: hidden; /* 超出部分隐藏 */
  78. }
  79. /* 图片自适应并裁剪 */
  80. .goods-info .goods-img img {
  81. width: 100%;
  82. height: 100%;
  83. object-fit: cover; /* 保持图片裁剪以适应容器 */
  84. }
  85. .card .card-show {
  86. text-align: center;
  87. width: 100%;
  88. cursor: pointer;
  89. color: #646cff;
  90. }
  91. /*topic list item*/
  92. .goods-info {
  93. display: block;
  94. margin-bottom: 12px;
  95. }
  96. .goods-info:hover {
  97. cursor: pointer;
  98. }
  99. .goods-info .goods-name {
  100. font-size: 1em;
  101. text-overflow: ellipsis;
  102. overflow: hidden;
  103. -webkit-line-clamp: 2;
  104. display: -webkit-box;
  105. -webkit-box-orient: vertical;
  106. }
  107. .goods-price {
  108. display: none;
  109. }
  110. .goods-info .goods-price {
  111. display: none;
  112. font-size: 0;
  113. color: transparent;
  114. }
  115. .goods-info .goods-price-od {
  116. display: none;
  117. }
  118. .goods-info .goods-original-price {
  119. display: none;
  120. }
  121. .goods-info br {
  122. display: none;
  123. }
  124. .goods-info .goods-discount-percentage {
  125. display: none;
  126. }
  127. .card-show {
  128. display: none;
  129. }
  130. .gift-pack {
  131. display: flex;
  132. flex-direction: column;
  133. padding: 20px;
  134. }
  135. .gift-pack h2 {
  136. font-size: 1.4em;
  137. padding-bottom: 10px;
  138. }
  139. .gift-pack-content {
  140. display: flex;
  141. flex-direction: row;
  142. align-items: center;
  143. justify-content: space-between;
  144. flex-wrap: wrap;
  145. }
  146. .content-item {
  147. font-size: 1em;
  148. width: calc(50% - 34px);
  149. display: grid;
  150. grid-template-rows: 1.6em 1.2em;
  151. grid-template-columns: 25% 1fr;
  152. margin: 5px;
  153. padding: 12px;
  154. border-radius: 5px;
  155. gap: 5px;
  156. overflow: hidden;
  157. text-overflow: ellipsis;
  158. white-space: nowrap;
  159. background-color: #dddddd;
  160. }
  161. .content-item .content-item-title {
  162. font-size: 1.2em;
  163. font-weight: bolder;
  164. color: #333333;
  165. grid-row: 1;
  166. grid-column: 2;
  167. overflow: hidden;
  168. text-overflow: ellipsis;
  169. white-space: nowrap;
  170. }
  171. .content-item .content-item-remark {
  172. overflow: hidden;
  173. text-overflow: ellipsis;
  174. white-space: nowrap;
  175. color: #555555;
  176. grid-row: 2;
  177. grid-column: 2;
  178. }
  179. .content-item .content-item-price {
  180. display: none;
  181. }
  182. .content-item .content-item-img {
  183. width: 100%;
  184. height: 100%;
  185. grid-column: 1 / span 1;
  186. grid-row: 1 / span 2;
  187. align-self: center;
  188. justify-self: center;
  189. }
  190. .content-item .content-item-img img {
  191. border-radius: 3px;
  192. width: 100%;
  193. height: 100%;
  194. }
  195. }
  196. @media screen and (min-width: 768px) {
  197. .home-suspension {
  198. left: 0;
  199. right: 0;
  200. top: 0;
  201. bottom: 0;
  202. position: absolute;
  203. z-index: 10;
  204. width: 0;
  205. height: 0;
  206. }
  207. .bottom-advertisement {
  208. position: fixed;
  209. bottom: 0;
  210. left: 0;
  211. width: 100%;
  212. height: 130px;
  213. background: #8a65d9;
  214. }
  215. .advertisement-content {
  216. width: 1180px;
  217. height: 130px;
  218. margin: auto auto;
  219. }
  220. .right-handler {
  221. position: fixed;
  222. bottom: 50px;
  223. right: 50px;
  224. width: 75px;
  225. background-color: white;
  226. display: flex;
  227. flex-direction: column;
  228. color: black;
  229. z-index: 1;
  230. border-radius: 8px;
  231. box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
  232. }
  233. .handler-btn .tooltip {
  234. display: none;
  235. }
  236. .handler-btn .handler-btn:hover .tooltip {
  237. display: block;
  238. }
  239. .handler-item-top {
  240. border-radius: 8px 8px 0 0;
  241. }
  242. .handler-item-bottom {
  243. border-radius: 0 0 8px 8px;
  244. }
  245. .handler-item {
  246. transition: background-color 0.3s ease-in-out;
  247. }
  248. .item-icon-top {
  249. padding: 10px 0;
  250. color: #666666;
  251. transform: rotateZ(180deg);
  252. display: flex;
  253. justify-content: center;
  254. align-items: center;
  255. }
  256. .item-icon-top div {
  257. width: 25px;
  258. height: 25px;
  259. }
  260. .right-handler div:hover {
  261. background-color: #1475fa;
  262. }
  263. .item-icon-top:hover {
  264. }
  265. .item-icon-top:hover span {
  266. color: white;
  267. }
  268. .item-icon-top:hover .item-icon {
  269. color: white;
  270. }
  271. .item-icon-top:hover .item-icon-top {
  272. color: white;
  273. }
  274. .handler-item-content {
  275. margin: 0 auto;
  276. width: 52px;
  277. height: 74px;
  278. justify-content: center;
  279. align-items: center;
  280. border-bottom: #F1F1F1 1px solid;
  281. display: flex;
  282. flex-direction: column;
  283. font-size: 13px;
  284. }
  285. .item-icon {
  286. color: #666666;
  287. }
  288. span {
  289. color: #333333;
  290. }
  291. .handler-item-content:hover {
  292. cursor: pointer;
  293. user-select: none;
  294. color: white;
  295. background-color: #1475fa;
  296. }
  297. .handler-item-content:hover span {
  298. color: white;
  299. }
  300. .handler-item-content:hover .item-icon {
  301. color: white;
  302. }
  303. .handler-item-content:hover .item-icon-top {
  304. color: white;
  305. }
  306. .tooltip {
  307. display: block;
  308. position: absolute;
  309. padding: 10px;
  310. border-radius: 8px;
  311. box-shadow: 0 0 3px rgba(0, 0, 0, 0.1);
  312. cursor: auto;
  313. color: #333333;
  314. }
  315. .tooltip-arrow {
  316. position: absolute;
  317. right: -9.5px;
  318. top: calc(50% - 10px);
  319. width: 10px;
  320. height: 20px;
  321. -webkit-clip-path: polygon(100% 50%, 0 0, 0 100%);
  322. clip-path: polygon(100% 50%, 0 0, 0 100%);
  323. }
  324. .slot-image {
  325. max-width: 80px;
  326. max-height: 80px;
  327. }
  328. .handler-to-top {
  329. cursor: pointer;
  330. }
  331. .gift-pack {
  332. width: 1170px;
  333. text-align: left;
  334. font-size: 12px;
  335. margin: 60px auto 50px auto;
  336. line-height: 18px;
  337. padding-bottom: 20px;
  338. border-bottom: 1px solid rgb(217, 217, 217);
  339. }
  340. .gift-pack-title {
  341. font-size: 24px;
  342. margin-bottom: 15px;
  343. }
  344. .gift-pack-content {
  345. display: grid;
  346. grid-template-columns: repeat(3, 1fr);
  347. grid-gap: 20px;
  348. }
  349. .content-item {
  350. cursor: pointer;
  351. }
  352. .content-item-img {
  353. max-width: 370px;
  354. max-height: 165px;
  355. overflow: hidden;
  356. }
  357. .content-item-img img {
  358. border-radius: 10px;
  359. width: 370px;
  360. height: 165px;
  361. }
  362. .content-item-title {
  363. font-weight: bold;
  364. font-size: 14px;
  365. }
  366. .content-item-remark {
  367. color: #999;
  368. }
  369. .content-item-price {
  370. display: flex;
  371. vertical-align: middle;
  372. margin: 10px 0;
  373. }
  374. .content-item-price div {
  375. margin-right: 10px;
  376. }
  377. .price-original {
  378. text-decoration: line-through;
  379. color: #888888;
  380. }
  381. .price-target {
  382. vertical-align: middle;
  383. padding: 0 3px;
  384. margin: 0 0 0 4px;
  385. background: rgb(223, 30, 28);
  386. color: white;
  387. font-weight: bolder;
  388. }
  389. .price-target span {
  390. color: white;
  391. }
  392. .price-now {
  393. font-family: BlinkMacSystemFont;
  394. font-size: 16px;
  395. }
  396. /*==============首页主题====================*/
  397. .card {
  398. width: 1180px;
  399. margin: auto;
  400. padding: 0;
  401. /* border: 1px solid #ccc; */
  402. text-align: left;
  403. }
  404. .card .card-header {
  405. margin: 20px 0 0 5px;
  406. display: flex;
  407. line-height: 32px;
  408. }
  409. .card .card-header .card-title {
  410. text-align: left;
  411. display: inline-block;
  412. padding: 0;
  413. width: auto;
  414. margin: 0;
  415. font-weight: bold;
  416. font-size: 24px;
  417. }
  418. .card .card-header .cart-other {
  419. flex: 1;
  420. margin: 0;
  421. width: auto;
  422. text-align: right;
  423. vertical-align: middle;
  424. align-items: center;
  425. font-size: 12px;
  426. }
  427. .card .card-header .cart-other a {
  428. cursor: pointer;
  429. padding: 5px 15px;
  430. color: white;
  431. background: #1475fa;
  432. }
  433. .card .card-des {
  434. margin: 8px 0 0 5px;
  435. color: #666666;
  436. font-size: 14px;
  437. }
  438. .card .card-list {
  439. display: flex;
  440. align-items: flex-start;
  441. flex-wrap: wrap;
  442. padding: 5px 0 0 0;
  443. margin-top: 15px;
  444. overflow: hidden;
  445. /* overflow-y: auto; */
  446. }
  447. .card .card-list div {
  448. margin-right: 30px;
  449. display: inline-block;
  450. }
  451. .card .card-list div:nth-child(6n) {
  452. margin-right: 0;
  453. }
  454. .card .card-list div:nth-child(6n+1) {
  455. margin-left: 5px;
  456. }
  457. .card .card-show {
  458. text-align: center;
  459. width: 100%;
  460. cursor: pointer;
  461. color: #646cff;
  462. }
  463. /*topic list item*/
  464. .goods-info {
  465. display: block;
  466. max-width: 170px;
  467. margin-bottom: 30px;
  468. }
  469. .goods-info:hover {
  470. cursor: pointer;
  471. }
  472. .goods-info .goods-img {
  473. width: auto;
  474. padding: 0;
  475. margin: 0 0 12px 0;
  476. overflow: hidden;
  477. display: flex;
  478. }
  479. .goods-info .goods-img img {
  480. height: 228px;
  481. width: 170px;
  482. }
  483. .goods-info .goods-img img:hover {
  484. z-index: 0;
  485. }
  486. .goods-info .goods-img:hover::after {
  487. opacity: 1;
  488. box-shadow: rgba(100, 100, 100, 0.3) 0 0 8px 3px;
  489. }
  490. .goods-info .goods-img::after {
  491. content: "";
  492. position: absolute;
  493. z-index: 9;
  494. width: 170px;
  495. height: 228px;
  496. box-sizing: border-box;
  497. background: rgba(229, 229, 229, 0.2);
  498. transform: translateX(-170px);
  499. animation: 0.2s ease 0s 1 normal none running enlarge;
  500. opacity: 0;
  501. transition: all 0.3s ease 0s;
  502. }
  503. .goods-info .goods-name {
  504. font-size: 12px;
  505. text-overflow: ellipsis;
  506. overflow: hidden;
  507. -webkit-line-clamp: 2;
  508. }
  509. .goods-info .goods-price {
  510. font-size: 16px;
  511. margin: 5px 0;
  512. font-weight: bold;
  513. }
  514. .goods-info .goods-price::before {
  515. content: "¥";
  516. }
  517. .goods-info .goods-original-price {
  518. display: inline-block;
  519. text-decoration: line-through;
  520. font-size: 12px;
  521. margin: 0;
  522. padding: 0;
  523. }
  524. .goods-info .goods-discount-percentage {
  525. display: inline-block;
  526. font-size: 12px;
  527. margin: 0 0 0 10px;
  528. padding: 0 5px;
  529. color: white;
  530. background: rgb(223, 30, 28);
  531. }
  532. .goods-info .goods-discount-percentage::before {
  533. content: "-";
  534. }
  535. .goods-info .goods-discount-percentage::after {
  536. content: "%";
  537. }
  538. }