<template>
  <div id="bookshelf">
    <HeaderTop />
    <!-- <div class="top-bg" /> -->
    <div class="bookshelf-header" style="height:120px">
      <router-link to="/">
        <span class="icon iconfont icon-l">&#xe631;</span>
      </router-link>
      <h2>数字资源</h2>
    </div>
    <div class="main">
      <!-- <div v-for="item in srcList" :key="item" class="book-rack"> -->
      <div v-for="item in srcList" :key="item" class="main-item">
        <img :src="item.bgImg">
        <div class="title">
          {{ item.title }}
        </div>
      </div>
    </div>
  </div>

</template>

<script>
import HeaderTop from '@/views/module/headerTop.vue'
import data1 from './data1.json'
export default {
  name: 'DigitalResource',
  components: {
    HeaderTop
  },
  data() {
    return {
      srcList: []
    }
  },
  created() {
    this.srcList = data1.srcList
  }
}
</script>

<style lang="scss" scoped>
@import "~@/assets/styles/index.scss";
.main{
  padding-top: 40px;
  height: calc(100vh - 180px);
  overflow: hidden;
  overflow-y:auto ;
  .main-item{
    // height: 387px;
    // margin-bottom: 40px;
    // padding: 0;
    // overflow: hidden;
    position: relative;
    img{
      width: 100%;
      // height: 100%;
    }
    .title{
      position: absolute;
      left: 50%;
      top: 50%;
      transform: translate(-50%,-50%);
      font-family: "HuXiaoBoNanShenTi";
      font-size: 80px;
      color: #333;
      overflow: hidden;
      text-overflow: ellipsis;
      display: -webkit-box;
      -webkit-line-clamp: 3;
      line-clamp: 3;
      -webkit-box-orient: vertical;
    }
  }
}
</style>
