等高对其css的样式

在这里插入图片描述

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Vue 测试实例 - 菜鸟教程(runoob.com)</title>
<script src="https://cdn.staticfile.org/vue/2.7.0/vue.min.js"></script>
<style>
  * {
    margin: 0; padding: 0;
  }
  .video_list {
    margin: 10px;
    display: flex;
    overflow-y: hidden;
  }
  .video_list li {
    border: 1px solid #aaa;
    border-radius: 5px;
    margin-right: 10px;
    display: inline-block;
    padding-bottom: 10px;
  }
  .video_list li img {
    width: 100%;
  }
  .video_list li:nth-last-child(1) {
    margin-right: 0;
  }
  .video_list::-webkit-scrollbar{
    display: none;
  }
  .title {
    width: 120px;
    /* autoprefixer: off */
    /* autoprefixer: ignore next */   
    display: -webkit-box;
    overflow: hidden;
    white-space: normal;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 14px;
    padding: 0 10px;
  }
  .cell {
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    padding: 0 10px;
  }
  del {
    font-size: 12px;
    padding: 0 10px;
  }
</style>
</head>
<body>
<div id="app">
  <div>
    <ul class="video_list" ref="content">
      <li v-for="(item, index) in list" :key="index">
        <img src="https://cube.elemecdn.com/6/94/4d3ea53c084bad6931a56d5158a48jpeg.jpeg" alt="">
        <div class="title">{{item.title}}</div>
        <div class="cell">
          <span>¥259</span>
          <span>+</span>
        </div>
        <del>¥275.25</del>
        <div v-if="item.isBtn">
          <button>查看详情</button>
        </div>
      </li>
     </ul>
  </div>
</div>

<script>
new Vue({
  el: '#app',
  data: {
    list: [
      {
        title: '啊啊啊啊啊啊啊啊',
        isBtn: false,
      },
      {
        title: '啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊',
        isBtn: true,
      },
      {
        title: '啊啊啊啊啊啊啊啊',
        isBtn: true,
      },
      {
        title: '啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊',
        isBtn: false,
      },
      {
        title: '啊啊啊啊啊啊啊啊',
        isBtn: false,
      },
      {
        title: '啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊',
        isBtn: true,
      }
    ]
  }
})
</script>
</body>
</html>
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值