css卡片滑块

复制代码
	<view class="train" >
						<scroll-view scroll-x="true" >
							<view class="card-content">
								<view class="card-item"
									style="margin-right:20rpx; display: inline-block;"
									v-for="(res, sub) in item.fileList" :key="sub">
									<view class="video-show">
										<video  :src="res.downloadUrl" type="video/mp4"  ></video>
									</view>
									<!-- <view style="position: absolute;bottom: 0;right: 0;">
                                    <image style="width: 200rpx;height: 166rpx;"
                                        :src="`/static/zjz1School/classify${index + 1}.png`" mode="aspectFill" />
                                </view> -->
								</view>

							</view>
						</scroll-view>
					</view>

.train {
  width: 100%;

  .card-content {
    display: flex;
    overflow-x: auto;
    width: 100%;

    .card-item {
      position: relative;
      width: 410rpx;
      height: 246rpx;
      border-radius: 10rpx;
      margin-right: 24rpx;
      display: flex;
      align-items: center;
      justify-content: center;

      .video-show {
        width: 410rpx;
        height: 246rpx;
        border-radius: 10rpx;
        overflow: hidden;

        video {
          width: 100%;
          height: 100%;
          object-fit: cover;
          poster: "path/to/poster.jpg"; //视频默认图片
        }
      }
    }

    .btn {
      width: 172rpx;
      height: 56rpx;
      background: linear-gradient(117deg, #5c8bfe 0%, #1e4df6 100%);
      border-radius: 29rpx;
      opacity: 1;
      line-height: 56rpx;
      text-align: center;
      color: #fff;
      font-size: 24rpx;
    }
  }
}
相关推荐
木斯佳30 分钟前
前端八股文面经大全:快手电商日常实习前端一面(2026-05-15)·面经深度解析
前端·面试·面经
2601_958492558 小时前
Optimizing Engagement with Freehead Skate - HTML5 Game - Construct 3
前端·html·html5
茉莉玫瑰花茶8 小时前
工作流的常见模式 [ 1 ]
java·服务器·前端
zhangxingchao9 小时前
AI应用开发六:企业知识库
前端·人工智能·后端
山峰哥9 小时前
SQL慢查询调优实战:从全表扫描到索引覆盖的完整复盘
前端·数据库·sql·性能优化
红尘散仙9 小时前
一个 `#[uniffi::export]`,把 Rust 接进 React Native
前端·后端·rust
moshuying9 小时前
AI Coding 最大的 token 黑洞,可能根本不是 prompt
前端
红尘散仙10 小时前
一行 `#[specta::specta]`,让 Tauri IPC 有类型
前端·后端·rust
lichenyang45310 小时前
HarmonyOS HMRouter 接入记录:从普通 Tab Demo 到路由跳转
前端