Created
December 7, 2021 01:41
-
-
Save ktskumar/2657b1a425fac87f9e7eff384e0602ee to your computer and use it in GitHub Desktop.
Animate Profile using Microsoft Graph Toolkit
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<mgt-person person-query="me"> | |
<template> | |
<div id="outerContainer" data-if="person.personImage"> | |
<div id="container"> | |
<div class="item"> | |
<img src="{{ person.personImage }}" /> | |
</div> | |
<div class="circle" style="animation-delay: -3s"> | |
</div> | |
<div class="circle" style="animation-delay: -2s"> | |
</div> | |
<div class="circle" style="animation-delay: -1s"> | |
</div> | |
<div class="circle" style="animation-delay: 0s"> | |
</div> | |
</div> | |
</div> | |
<div data-else> | |
{{ person.displayName }} | |
</div> | |
</template> | |
</mgt-person> | |
<style> | |
#container { | |
width: 200px; | |
height: 200px; | |
border-radius:50%; | |
display: flex; | |
align-items: center; | |
justify-content: center; | |
overflow: hidden; | |
position: relative; | |
} | |
.circle { | |
border-radius: 50%; | |
background: rgba(53,105,243,1); | |
width: 150px; | |
height: 150px; | |
position: absolute; | |
opacity: 0; | |
animation: scaleIn 6s infinite cubic-bezier(0.36, 0.11, 0.89, 0.32); | |
} | |
.item { | |
z-index: 100; | |
padding: 5px; | |
} | |
.item img { | |
width: 100px; | |
border-radius: 50%; | |
} | |
@keyframes scaleIn { | |
from { | |
transform: scale(0.5, 0.5); | |
opacity: 0.35; | |
} | |
to { | |
transform: scale(2.5, 2.5); | |
opacity: 0; | |
} | |
} | |
</style> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment