detail.wxss 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573
  1. /* pages/video/detail.wxss */
  2. page {
  3. height: 100%;
  4. background: #fff;
  5. }
  6. .container {
  7. display: flex;
  8. flex-direction: column;
  9. width: 100%;
  10. height: 100vh;
  11. background-color: #fff;
  12. }
  13. /* 导航栏 */
  14. .nav-container {
  15. background: #fff;
  16. position: fixed;
  17. top: 0;
  18. left: 0;
  19. width: 100%;
  20. z-index: 99;
  21. height: 88px; /* 44px状态栏 + 44px导航 */
  22. display: flex;
  23. align-items: flex-end;
  24. padding-bottom: 10px;
  25. }
  26. .nav-back {
  27. position: absolute;
  28. bottom: 10px;
  29. left: 16rpx;
  30. width: 60rpx;
  31. height: 60rpx;
  32. display: flex;
  33. align-items: center;
  34. justify-content: center;
  35. }
  36. .icon-back {
  37. width: 40rpx;
  38. height: 40rpx;
  39. }
  40. .video-title {
  41. position: absolute;
  42. top: 110rpx;
  43. left: 50%;
  44. transform: translateX(-50%);
  45. flex: 1;
  46. width: 390rpx;
  47. overflow: hidden;
  48. text-overflow: ellipsis;
  49. display: -webkit-box;
  50. -webkit-line-clamp: 1;
  51. -webkit-box-orient: vertical;
  52. font-size: 32rpx;
  53. color: #333;
  54. text-align: center;
  55. margin: 0 auto;
  56. }
  57. .video-container {
  58. position: absolute;
  59. left: 0;
  60. width: 100%;
  61. top: 88px; /* 与导航栏高度一致 */
  62. height: calc(100% - 88px);
  63. }
  64. .video-main {
  65. position: relative;
  66. height: 500rpx;
  67. }
  68. .my-video {
  69. position: relative;
  70. width: 100%;
  71. height: 100%;
  72. }
  73. /* 视频控制区域 */
  74. .video-control-area {
  75. position: absolute;
  76. top: 0;
  77. left: 0;
  78. width: 100%;
  79. height: 100%;
  80. z-index: 9;
  81. display: flex;
  82. justify-content: center;
  83. align-items: center;
  84. }
  85. .video-play-status {
  86. width: 120rpx;
  87. height: 120rpx;
  88. background-color: rgba(0, 0, 0, 0.3);
  89. border-radius: 50%;
  90. display: flex;
  91. justify-content: center;
  92. align-items: center;
  93. }
  94. .icon-play {
  95. width: 60rpx;
  96. height: 60rpx;
  97. }
  98. /* 加载中样式 */
  99. .loading-container {
  100. position: absolute;
  101. top: 0;
  102. left: 0;
  103. right: 0;
  104. bottom: 0;
  105. display: flex;
  106. flex-direction: column;
  107. justify-content: center;
  108. align-items: center;
  109. background-color: #000;
  110. }
  111. .loading-spinner {
  112. width: 80rpx;
  113. height: 80rpx;
  114. border: 6rpx solid rgba(255, 255, 255, 0.1);
  115. border-left-color: #fff;
  116. border-radius: 50%;
  117. animation: spin 1s linear infinite;
  118. }
  119. @keyframes spin {
  120. to {
  121. transform: rotate(360deg);
  122. }
  123. }
  124. .loading-text {
  125. margin-top: 20rpx;
  126. font-size: 28rpx;
  127. color: rgba(255, 255, 255, 0.7);
  128. }
  129. /* 底部容器 */
  130. .bottom-container {
  131. padding: 0 30rpx;
  132. }
  133. /* 分享按钮 */
  134. .middle-share-container {
  135. position: relative;
  136. box-sizing: border-box;
  137. display: flex;
  138. align-items: center;
  139. justify-content: space-around;
  140. padding: 50rpx 0;
  141. }
  142. .middle-share-btn {
  143. position: relative;
  144. width: 260rpx;
  145. height: 90rpx;
  146. border-radius: 50rpx;
  147. font-size: 32rpx;
  148. font-family: PingFang SC, PingFang SC-Bold;
  149. line-height: 42rpx;
  150. color: #ffffff;
  151. display: flex;
  152. align-items: center;
  153. justify-content: center;
  154. }
  155. .middle-share-btn-green {
  156. background: #14b96c;
  157. }
  158. .middle-share-btn-orange {
  159. background: #ff7300;
  160. }
  161. .icon-wechat {
  162. width: 45rpx;
  163. height: 45rpx;
  164. margin-right: 10rpx;
  165. }
  166. .cover-button {
  167. position: absolute;
  168. top: 0;
  169. left: 0;
  170. width: 100%;
  171. height: 100%;
  172. opacity: 0;
  173. }
  174. /* 标题样式 */
  175. .title-wrap {
  176. padding: 30rpx 0;
  177. color: #111;
  178. }
  179. .title {
  180. width: 100%;
  181. font-size: 44rpx;
  182. font-family: PingFang SC, PingFang SC-Bold;
  183. letter-spacing: 2rpx;
  184. font-weight: bold;
  185. overflow: hidden;
  186. }
  187. /* 视频信息 */
  188. .video-info {
  189. margin-bottom: 20rpx;
  190. }
  191. .video-stats {
  192. display: flex;
  193. justify-content: space-between;
  194. align-items: center;
  195. margin-bottom: 20rpx;
  196. font-size: 28rpx;
  197. color: #666;
  198. }
  199. /* 视频描述 */
  200. .video-description {
  201. font-size: 28rpx;
  202. color: #333;
  203. line-height: 1.6;
  204. margin-bottom: 20rpx;
  205. }
  206. /* 互动按钮 */
  207. .interaction-bar {
  208. display: flex;
  209. justify-content: space-around;
  210. padding: 20rpx 0;
  211. border-bottom: 1px solid #f0f0f0;
  212. margin-bottom: 20rpx;
  213. }
  214. .interaction-item {
  215. display: flex;
  216. flex-direction: column;
  217. align-items: center;
  218. position: relative;
  219. }
  220. .icon-interact {
  221. width: 50rpx;
  222. height: 50rpx;
  223. margin-bottom: 10rpx;
  224. }
  225. .interaction-item text {
  226. font-size: 24rpx;
  227. color: #666;
  228. }
  229. /* 视频标签 */
  230. .video-tags {
  231. display: flex;
  232. flex-wrap: wrap;
  233. margin-top: 16rpx;
  234. }
  235. .tag {
  236. font-size: 24rpx;
  237. color: #ff4757;
  238. background-color: rgba(255, 71, 87, 0.08);
  239. padding: 8rpx 20rpx;
  240. border-radius: 30rpx;
  241. margin-right: 16rpx;
  242. margin-bottom: 16rpx;
  243. }
  244. /* 剧集列表 */
  245. .episode-section {
  246. margin-bottom: 20rpx;
  247. }
  248. .section-title {
  249. display: flex;
  250. justify-content: space-between;
  251. align-items: center;
  252. margin-bottom: 24rpx;
  253. }
  254. .title-text {
  255. font-size: 32rpx;
  256. font-weight: bold;
  257. color: #333;
  258. }
  259. .episode-count {
  260. font-size: 28rpx;
  261. color: #666;
  262. }
  263. .episode-list {
  264. white-space: nowrap;
  265. height: 80rpx;
  266. }
  267. .episode-item {
  268. display: inline-block;
  269. margin-right: 16rpx;
  270. padding: 0 30rpx;
  271. height: 80rpx;
  272. line-height: 80rpx;
  273. border-radius: 40rpx;
  274. background-color: #f6f6f6;
  275. font-size: 28rpx;
  276. color: #666;
  277. }
  278. .episode-item.active {
  279. background-color: #ff4757;
  280. color: #fff;
  281. }
  282. /* 返回首页按钮 */
  283. .home-btn {
  284. border: 1px solid #eeeeee;
  285. color: #121212;
  286. height: 100rpx;
  287. line-height: 100rpx;
  288. text-align: center;
  289. width: 100%;
  290. border-radius: 10rpx;
  291. font-size: 40rpx;
  292. margin-bottom: 30rpx;
  293. }
  294. /* 更多推荐标题 */
  295. .more-title {
  296. color: #121212;
  297. font-size: 32rpx;
  298. text-align: center;
  299. margin-top: 30rpx;
  300. }
  301. /* 相关推荐 */
  302. .recommend-section {
  303. padding: 30rpx;
  304. background: #fff;
  305. }
  306. .recommend-title {
  307. font-size: 32rpx;
  308. font-weight: bold;
  309. color: #333;
  310. margin-bottom: 20rpx;
  311. text-align: center;
  312. }
  313. .video-list {
  314. display: flex;
  315. flex-direction: column;
  316. gap: 20rpx;
  317. }
  318. /* 换一换按钮 */
  319. .change-video {
  320. width: 80rpx;
  321. height: 80rpx;
  322. display: flex;
  323. justify-content: center;
  324. align-items: center;
  325. position: fixed;
  326. right: 30rpx;
  327. bottom: 15%;
  328. background: #fff;
  329. border-radius: 50%;
  330. z-index: 99;
  331. }
  332. .icon-change {
  333. width: 80rpx;
  334. height: 80rpx;
  335. position: absolute;
  336. top: 0;
  337. left: 0;
  338. }
  339. /* 视频卡片样式 */
  340. .video-item {
  341. position: relative;
  342. margin-bottom: 20rpx;
  343. border-radius: 12rpx;
  344. overflow: hidden;
  345. box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.05);
  346. }
  347. .video-item::before{
  348. content: "";
  349. width: 100%;
  350. height: 100%;
  351. background-color: rgba(0, 0, 0, 0.4);
  352. z-index: 2;
  353. position: absolute;
  354. top: 0;
  355. left: 0;
  356. }
  357. .video-cover-container {
  358. width: 100%;
  359. height: 380rpx;
  360. }
  361. .video-cover {
  362. width: 100%;
  363. height: 100%;
  364. }
  365. .play-button-container {
  366. position: absolute;
  367. top: 0;
  368. left: 0;
  369. right: 0;
  370. bottom: 0;
  371. display: flex;
  372. align-items: center;
  373. justify-content: center;
  374. z-index: 3;
  375. }
  376. .play-button {
  377. width: 100rpx;
  378. height: 100rpx;
  379. border-radius: 50%;
  380. background-color: rgba(255, 255, 255, 0.5);
  381. display: flex;
  382. align-items: center;
  383. justify-content: center;
  384. }
  385. .play-button-lock {
  386. /* width: 100rpx; */
  387. height: 100rpx;
  388. text-align: center;
  389. /* display: flex;
  390. align-items: center;
  391. justify-content: center; */
  392. }
  393. .play-button-lock-title {
  394. width: 100%;
  395. color: yellow;
  396. font-weight: 600;
  397. }
  398. .play-icon {
  399. width: 100rpx;
  400. height: 100rpx;
  401. }
  402. .video-item-title {
  403. position: absolute;
  404. top: 20rpx;
  405. left: 20rpx;
  406. font-size: 42rpx;
  407. font-weight: bold;
  408. color: #fff;
  409. margin-bottom: 10rpx;
  410. display: -webkit-box;
  411. width: 95%;
  412. z-index: 3;
  413. }
  414. .video-play-count {
  415. position: absolute;
  416. bottom: 20rpx;
  417. left: 20rpx;
  418. font-size: 36rpx;
  419. color: #fff;
  420. margin-top: 10rpx;
  421. z-index: 3;
  422. }
  423. .share-button {
  424. position: absolute;
  425. right: 20rpx;
  426. bottom: 20rpx;
  427. display: flex;
  428. flex-direction: row;
  429. align-items: center;
  430. justify-content: center;
  431. background: #07c160;
  432. border-radius: 40rpx;
  433. padding: 7rpx 20rpx;
  434. z-index: 3;
  435. border: 2rpx solid #fff;
  436. }
  437. .share-icon {
  438. width: 48rpx;
  439. height: 48rpx;
  440. margin-right: 8rpx;
  441. }
  442. .share-button text {
  443. font-size: 28rpx;
  444. color: #fff;
  445. font-weight: 500;
  446. }
  447. .share-cover-button {
  448. position: absolute;
  449. top: 0;
  450. left: 0;
  451. width: 100%;
  452. height: 100%;
  453. opacity: 0;
  454. z-index: 4;
  455. padding: 0;
  456. margin: 0;
  457. border: none;
  458. background: transparent;
  459. }
  460. .share-cover-button::after {
  461. display: none;
  462. }
  463. /* 视频列表样式 */
  464. .video-list {
  465. padding: 20rpx;
  466. }
  467. .video-item {
  468. position: relative;
  469. margin-bottom: 20rpx;
  470. border-radius: 12rpx;
  471. overflow: hidden;
  472. box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.05);
  473. }
  474. .video-item::before {
  475. content: "";
  476. width: 100%;
  477. height: 100%;
  478. background-color: rgba(0, 0, 0, 0.4);
  479. z-index: 2;
  480. position: absolute;
  481. top: 0;
  482. left: 0;
  483. }
  484. .video-cover-container {
  485. width: 100%;
  486. height: 380rpx;
  487. }
  488. .video-cover {
  489. width: 100%;
  490. height: 100%;
  491. }
  492. .video-item-title {
  493. position: absolute;
  494. top: 20rpx;
  495. left: 20rpx;
  496. font-size: 42rpx;
  497. font-weight: bold;
  498. color: #fff;
  499. margin-bottom: 10rpx;
  500. display: -webkit-box;
  501. width: 95%;
  502. z-index: 3;
  503. }