screenFront/src/views/Hazardous/components/Border.vue

88 lines
1.8 KiB
Vue
Raw Normal View History

<template>
<div class="border-container">
2023-09-25 10:10:36 +00:00
<img src="../image/u91.svg" alt="" class="border-w">
<img src="../image/u93.svg" alt="" class="border-t">
<div class="top">
{{ prop.title }}
</div>
2023-09-26 10:00:11 +00:00
<div class="border-content">
2023-09-25 10:10:36 +00:00
<slot></slot>
</div>
</div>
</template>
<script setup lang='ts'>
2023-09-25 10:10:36 +00:00
const prop = defineProps({
title: {
type: String,
default: '边框'
}
})
</script>
<style scoped>
.border-container {
2023-09-25 10:10:36 +00:00
width: 100%;
height: 100%;
position: relative;
2023-09-26 10:00:11 +00:00
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: center;
}
2023-09-25 10:10:36 +00:00
.border-w {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
}
.border-t {
width: 55%;
height: 10%;
position: absolute;
top: 0;
left: 22.5%;
}
.top {
2023-09-26 10:00:11 +00:00
width: 100%;
2023-09-25 10:10:36 +00:00
height: 10%;
font-size: 20px;
font-weight: 700;
2023-09-26 10:00:11 +00:00
position: relative;
2023-09-25 10:10:36 +00:00
display: flex;
justify-content: center;
align-items: center;
}
.top::after {
content: '';
border-width: 0px;
position: absolute;
2023-09-26 10:00:11 +00:00
left: 37.5%;
2023-09-25 10:10:36 +00:00
bottom: -3px;
2023-09-26 10:00:11 +00:00
width: 25%;
2023-09-25 10:10:36 +00:00
height: 6px;
background: -webkit-linear-gradient(0deg, rgba(25, 126, 207, 1) 0%, rgba(25, 126, 207, 1) 0%, rgba(50, 214, 249, 1) 100%, rgba(50, 214, 249, 1) 100%);
background: -moz-linear-gradient(90deg, rgba(25, 126, 207, 1) 0%, rgba(25, 126, 207, 1) 0%, rgba(50, 214, 249, 1) 100%, rgba(50, 214, 249, 1) 100%);
background: linear-gradient(90deg, rgba(25, 126, 207, 1) 0%, rgba(25, 126, 207, 1) 0%, rgba(50, 214, 249, 1) 100%, rgba(50, 214, 249, 1) 100%);
border: none;
border-radius: 25px;
-moz-box-shadow: 0px -2px 20px rgba(45, 196, 240, 1);
-webkit-box-shadow: 0px -2px 20px rgba(45, 196, 240, 1);
box-shadow: 0px -2px 20px rgba(45, 196, 240, 1);
}
2023-09-26 10:00:11 +00:00
.border-content {
width: 100%;
height: 90%;
box-sizing: border-box;
padding: 5px;
}
</style>