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;
    }
  }
}
相关推荐
知忆_IS34 分钟前
TerriaMap 开发实战04:MVT数据自定义符号化 - terriajs源码修改
javascript·webgis·terriamap·terriajs
reasonsummer1 小时前
【教学类-150-03】20261108蝴蝶连连看html(一页2个版面、3个版面)
python·html
卸任1 小时前
AI 编程工具越用越多,模型配置越来越乱:用 Magpie 把它们管起来
前端·ai编程
前端一课1 小时前
凝神诀
前端
前端双越老师2 小时前
程序员 1v1 访谈系列第十三期:大龄已育空窗一年如何破局
前端·ai编程·全栈
恋猫de小郭2 小时前
Flutter 大小核优化又被回滚,然后又开新提案?
android·前端·flutter
MyBili2 小时前
Chrome扩展开发入门:从零打造实用浏览器插件
前端·chrome·谷歌浏览器·效率工具·浏览器插件·前端入门·扩展开发
FungLeo2 小时前
成为全栈·Vue 管理后台篇·Vue3 + Vite + Naive UI:后台工程基座怎么搭
前端·vue.js·ui·typescript·vite·前端工程化·biome
云上工程笔记3 小时前
SRT字幕一键转手绘动画:srt-whiteboard-animation的复刻实录
大数据·开发语言·javascript·人工智能·机器学习