contrast-card.vue 1.74 KB
Newer Older
王礼鸿 Baimax Wang's avatar
王礼鸿 Baimax Wang committed
1
<template>
张恒's avatar
张恒 committed
2 3 4 5 6 7 8 9 10
  <div class="contrast_card">
    <div class="top_border"></div>
    <div class="top_side_dot"/>
    <div class="bottom_side_dot"/>
    <div class="bottom_border"></div>
    <div class="card_content">
      <slot></slot>
    </div>
  </div>
王礼鸿 Baimax Wang's avatar
王礼鸿 Baimax Wang committed
11
</template>
张恒's avatar
张恒 committed
12

王礼鸿 Baimax Wang's avatar
王礼鸿 Baimax Wang committed
13 14 15
<script>

export default {
张恒's avatar
张恒 committed
16
  name: "ContrastCard"
王礼鸿 Baimax Wang's avatar
王礼鸿 Baimax Wang committed
17 18
};
</script>
张恒's avatar
张恒 committed
19

王礼鸿 Baimax Wang's avatar
王礼鸿 Baimax Wang committed
20 21
<style scoped>

张恒's avatar
张恒 committed
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
.contrast_card {
  position: relative;
  background-color: var(--card-background-color);
}

.top_border {
  height: 33%;
  border-top: 2px solid var(--card-border1-color);
  border-left: 2px solid var(--card-border1-color);
  border-right: 2px solid var(--card-border1-color);
}

.top_side_dot {
  position: relative;
  height: 17%;
}

.top_side_dot::before {
  content: "";
  position: absolute;
  left: -2px;
  height: 6px;
  width: 6px;
  border-radius: 50%;
  background-color: var(--card-border2-color);
}

.top_side_dot::after {
  content: "";
  position: absolute;
  right: -2px;
  height: 6px;
  width: 6px;
  border-radius: 50%;
  background-color: var(--card-border2-color);
}

.bottom_side_dot {
  position: relative;
  height: 17%;
}

.bottom_side_dot::before {
  content: "";
  position: absolute;
  left: -2px;
  bottom: 0;
  height: 6px;
  width: 6px;
  border-radius: 50%;
  background-color: var(--card-border2-color);
}

.bottom_side_dot::after {
  content: "";
  position: absolute;
  right: -2px;
  bottom: 0;
  height: 6px;
  width: 6px;
  border-radius: 50%;
  background-color: var(--card-border2-color);
}

.bottom_border {
  height: 33%;
  border-left: 2px solid var(--card-border1-color);
  border-right: 2px solid var(--card-border1-color);
  border-bottom: 2px solid var(--card-border1-color);
}

.card_content {
  position: absolute;
  top: 0;
  height: 100%;
  width: 100%;
  padding: 0.5rem;
}

王礼鸿 Baimax Wang's avatar
王礼鸿 Baimax Wang committed
101
</style>