whychdw
2019-12-09 064c6d5b84fd6ddbbe4c20c41d139f7371460985
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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
<template>
    <div class="science-card" :style="style">
        <div class="science-card-mask"></div>
        <div class="science-card-content">
            <slot></slot>
        </div>
    </div>
</template>
<script>
export default {
    props:{
        width:{
            type: String,
            default: '300px'
        },
        height:{
            type: String,
            default: '100px;'
        }
    },
    data() {
        return {
            style: {
                width: this.width,
                height: this.height
            }
        }
    }
}
</script>
<style scoped>
    .science-card {
        position: relative;
    }
    .science-card .science-card-mask {
        position: absolute;
        top: 0;
        left: 0;
        bottom: 0;
        right: 0;
        background: #1D2D4F;
        opacity: .6;
        z-index: -1;
    }
    .science-card .science-card-content {
        width: 100%;
        height: 100%;
        overflow: auto;
    }
</style>