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;
    }
  }
}
相关推荐
To_OC4 小时前
写了三遍 Todo List,我终于搞懂了 React 父子组件到底怎么通信
前端·javascript·react.js
勇往直前plus4 小时前
Vue3(篇一) 核心概念——响应式模板语法与组件基础
前端·javascript·vue.js
咩咩啃树皮4 小时前
第43篇:Vue3计算属性(computed)完全精讲——缓存机制、依赖计算、业务最优解
前端·vue.js·缓存
用户938515635076 小时前
从零搭建 AI 日记助手:用 Milvus 向量数据库 + RAG 让机器读懂你的每一天
javascript·人工智能·全栈
徐小夕6 小时前
花了一周,3亿tokens,我开源了一款 Word 文档智能审查平台,文稿自动质检+可视化分析,告别低效人工审核
前端·算法·github
a1117767 小时前
坦克大战3D Three.js 3D (开源项目)
开发语言·javascript·3d
kyriewen8 小时前
别再乱用useEffect了——你写的10个里有8个不该存在
前端·javascript·react.js
Ivanqhz8 小时前
Rust &‘static str浅析
java·前端·javascript·rust
IT_陈寒8 小时前
SpringBoot这个分页坑,我踩了三天才爬出来
前端·人工智能·后端
颜酱9 小时前
05 | 召回前置准备:根据业务数据库生成各数据库(读取配置阶段)
前端·人工智能·后端