Box.vue 1.07 KB
<template>
  <div class='box'>
    <div class="box-title">
      <div class='box-title-arrow'></div>
      <div class='box-title-name'>
        <slot name="title"></slot>
      </div>
    </div>
    <slot></slot>
  </div>
</template>

<script type='text/ecmascript-6'>
export default {
  name: 'Box',
  data () {
    return {
    }
  }
}
</script>

<style scoped lang='scss'>
.box {
  height: 100%;
  width: 100%;
  color: #fff;
  background: url("~@a/box-bottom.png") no-repeat;
  background-size: 100% 76px;
  background-position-y: bottom;
  position: relative;
  &-title {
    height: 125px;
    width: 100%;
    background: url("~@a/box-top.png") no-repeat;
    background-size: 100% 100%;
    position: relative;
    box-sizing: border-box;
    padding: 40px 0 0 44px;
    &-arrow {
      float: left;
      width: 20px;
      height: 32px;
      background: url("~@a/arrow.png") no-repeat;
      background-size: cover;
      transform: translateY(6px);
    }
    &-name {
      float: left;
      padding-left: 30px;
      font-size: 34px;
      letter-spacing: 8px;
    }
  }
}
</style>