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;
    }
  }
}
相关推荐
4Forsee几秒前
【Android】动态操作 Window 的背后机制
android·java·前端
用户90443816324605 分钟前
从40亿设备漏洞到AI浏览器:藏在浏览器底层的3个“隐形”原理
前端·javascript·浏览器
小二李9 分钟前
第12章 koa框架重构篇 - Koa框架项目重构
java·前端·重构
鸡吃丸子13 分钟前
React Native入门详解
开发语言·前端·javascript·react native·react.js
阿蒙Amon17 分钟前
JavaScript学习笔记:12.类
javascript·笔记·学习
qq_4287232419 分钟前
英语歌10个月之前启蒙磨耳朵
前端
Hao_Harrision23 分钟前
50天50个小项目 (React19 + Tailwindcss V4) ✨ | DrinkWater(喝水记录组件)
前端·react.js·typescript·vite7·tailwildcss
SadSunset30 分钟前
(19)Bean的循环依赖问题
java·开发语言·前端
JIngJaneIL33 分钟前
基于Java+ vue图书管理系统(源码+数据库+文档)
java·开发语言·前端·数据库·vue.js·spring boot·后端
阿蒙Amon39 分钟前
JavaScript学习笔记:10.集合
javascript·笔记·学习