123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143 |
- <template>
- <div class="container">
- <div class="dot"></div>
- <div class="pulse"></div>
- <div class="content" v-for="(item , index) in worn" :key="index">{{item}}</div>
- </div>
- </template>
- <script>
- export default {
- props: {
- worn: Array,
- },
- }
- </script>
- <style scoped>
- @keyframes warn {
- 0% {
- transform: scale(0.3);
- -webkit-transform: scale(0.3);
- opacity: 0.0;
- }
- 25% {
- transform: scale(0.3);
- -webkit-transform: scale(0.3);
- opacity: 0.1;
- }
- 50% {
- transform: scale(0.5);
- -webkit-transform: scale(0.5);
- opacity: 0.3;
- }
- 75% {
- transform: scale(0.8);
- -webkit-transform: scale(0.8);
- opacity: 0.5;
- }
- 100% {
- transform: scale(1);
- -webkit-transform: scale(1);
- opacity: 0.0;
- }
- }
- @keyframes warn1 {
- 0% {
- transform: scale(0.3);
- -webkit-transform: scale(0.3);
- opacity: 0.0;
- }
- 25% {
- transform: scale(0.3);
- -webkit-transform: scale(0.3);
- opacity: 0.1;
- }
- 50% {
- transform: scale(0.3);
- -webkit-transform: scale(0.3);
- opacity: 0.3;
- }
- 75% {
- transform: scale(0.5);
- -webkit-transform: scale(0.5);
- opacity: 0.5;
- }
- 100% {
- transform: scale(0.8);
- -webkit-transform: scale(0.8);
- opacity: 0.0;
- }
- }
- .container {
- position: absolute;
- width: 40px;
- height: 40px;
- z-index: 99;
- /*border: 1px solid #000; hovertree.com */
- }
- .content{
- position: relative;
- display: none;
- z-index: 9999;
- }
- .container:hover .content{
- /* position: absolute; */
- padding: 10px;
- width: 200px;
- color: #000000;
- background-color: #ffffff;
- display: block;
- min-height: 20px;
- z-index: 9999;
- margin-left: 40px;
- }
- /* 保持大小不变的小圆圈 何问起 */
- .dot {
- position: absolute;
- width: 8px;
- height: 8px;
- left: 42px;
- top: 42px;
- -webkit-border-radius: 50%;
- -moz-border-radius: 50%;
- border: 2px solid red;
- border-radius: 50%;
- z-index: 2;
- background-color: red;
- }
- /* 产生动画(向外扩散变大)的圆圈 */
- .pulse {
- position: absolute;
- width: 80px;
- height: 80px;
- left: 2px;
- top: 2px;
- border: 6px solid red;
- -webkit-border-radius: 50%;
- -moz-border-radius: 50%;
- border-radius: 50%;
- z-index: 1;
- opacity: 0;
- -webkit-animation: warn 1.5s linear;
- -moz-animation: warn 1.5s linear;
- animation: warn 1.5s linear;
- -webkit-animation-iteration-count: infinite;
- -moz-animation-iteration-count: infinite;
- animation-iteration-count: infinite;
- box-shadow: 1px 1px 30px red;
- }
- </style>
|