137 lines
2.8 KiB
Vue
137 lines
2.8 KiB
Vue
<template>
|
|
<div id="decoration">
|
|
<border-box-7 class="decoration-container">
|
|
<decoration-1 class="decoration d1 center" />
|
|
|
|
<div class="title">Decoration-1</div>
|
|
<highlight-code>
|
|
<decoration-1 />
|
|
</highlight-code>
|
|
</border-box-7>
|
|
|
|
<border-box-7 class="decoration-container">
|
|
<decoration-2 class="decoration d2 center" />
|
|
<div class="title">Decoration-2</div>
|
|
<highlight-code>
|
|
<decoration-2 />
|
|
</highlight-code>
|
|
</border-box-7>
|
|
|
|
<border-box-7 class="decoration-container">
|
|
<decoration-2 class="decoration d2r center" :reverse="true" />
|
|
<div class="title">Decoration-2(reverse)</div>
|
|
<highlight-code>
|
|
<decoration-2 :reverse="true" />
|
|
</highlight-code>
|
|
</border-box-7>
|
|
|
|
<border-box-7 class="decoration-container">
|
|
<decoration-3 class="decoration d3 center" />
|
|
<div class="title">Decoration-3</div>
|
|
<highlight-code>
|
|
<decoration-3 />
|
|
</highlight-code>
|
|
</border-box-7>
|
|
|
|
<border-box-7 class="decoration-container">
|
|
<decoration-4 class="decoration d4 center" />
|
|
<div class="title">Decoration-4</div>
|
|
<highlight-code>
|
|
<decoration-4 />
|
|
</highlight-code>
|
|
</border-box-7>
|
|
|
|
<border-box-7 class="decoration-container">
|
|
<decoration-4 class="decoration d4r center" :reverse="true" />
|
|
<div class="title">Decoration-4(reverse)</div>
|
|
<highlight-code>
|
|
<decoration-4 :reverse="true" />
|
|
</highlight-code>
|
|
</border-box-7>
|
|
|
|
<border-box-7 class="decoration-container">
|
|
<decoration-5 class="decoration d4r center" :reverse="true" />
|
|
<div class="title">Decoration-5</div>
|
|
<highlight-code>
|
|
<decoration-5 />
|
|
</highlight-code>
|
|
</border-box-7>
|
|
|
|
<border-box-7 class="decoration-container">
|
|
<loading class="decoration center" />
|
|
<div class="title">Loading</div>
|
|
<highlight-code>
|
|
<loading />
|
|
</highlight-code>
|
|
</border-box-7>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
name: 'DecorationDemo'
|
|
}
|
|
</script>
|
|
|
|
<style lang="less">
|
|
#decoration {
|
|
display: flex;
|
|
flex-direction: row;
|
|
flex-wrap: wrap;
|
|
justify-content: center;
|
|
padding-bottom: 100px;
|
|
|
|
.decoration-container {
|
|
position: relative;
|
|
width: 300px;
|
|
height: 300px;
|
|
margin: 0 20px;
|
|
margin-bottom: 20px;
|
|
text-align: center;
|
|
font-weight: bold;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
|
|
.title {
|
|
text-indent: 0;
|
|
}
|
|
}
|
|
|
|
.decoration {
|
|
position: absolute;
|
|
transform: translate(-50%, -50%);
|
|
}
|
|
|
|
.center {
|
|
top: 50%;
|
|
left: 50%;
|
|
}
|
|
|
|
.d1 {
|
|
width: 200px;
|
|
}
|
|
|
|
.d2 {
|
|
width: 300px;
|
|
}
|
|
|
|
.d2r {
|
|
height: 300px;
|
|
}
|
|
|
|
.d3 {
|
|
width: 200px;
|
|
}
|
|
|
|
.d4 {
|
|
height: 300px;
|
|
}
|
|
|
|
.d4r {
|
|
width: 300px;
|
|
}
|
|
}
|
|
</style>
|