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;
    }
  }
}
相关推荐
临江仙45518 分钟前
前端骚操作:用户还在摸鱼,新版本已悄悄上线!一招实现无感知版本更新通知
前端·vue.js
想个什么名好呢18 分钟前
解决uniapp的H5项目uni-popup页面滚动穿透bug
前端
用户938169125536029 分钟前
Vue3项目--mock数据
前端
前端加油站43 分钟前
一种新HTML 页面转换成 PDF 技术方案
前端·javascript·vue.js
w***Q3501 小时前
Vue打包
前端·javascript·vue.js
有事没事实验室1 小时前
router-link的custom模式
前端·javascript·vue.js
4***V2021 小时前
Vue3响应式原理详解
开发语言·javascript·ecmascript
常乐我净6161 小时前
十、路由和导航
前端
Tonychen1 小时前
TypeScript 里 infer 常见用法
前端·typescript
米诺zuo1 小时前
MUI sx prop 中的响应式适配
前端