DDR爱好者之家 Design By 杰米
今天给大家分享一款html5和css3动画排列人物头像演示。这款实例页面初始时,只有中间的美女图,然后出现微笑图,紧接着出现小的人物图,慢慢的以动画的形式排列到页面中形成一个圆环。效果图如下:
实现的代码。
html代码:
XML/HTML Code复制内容到剪贴板- <div class='stage'>
- <div class='image'>
- <img src="https://pbs.twimg.com/profile_images/529224080751202304/UNLt5nUZ_400x400.jpeg">
- <div class='smiley'>
- <svg width="30px" height="30px">
- <path fill="#effedd" d="M15,0C6.7,0,0,6.7,0,15c0,8.3,6.7,15,15,15s15-6.7,15-15C30,6.7,23.3,0,15,0z M20.5,8c1.4,0,2.5,1.1,2.5,2.5c0,1.4-1.1,2.5-2.5,2.5S18,11.9,18,10.5C18,9.1,19.1,8,20.5,8z M10.5,8c1.4,0,2.5,1.1,2.5,2.5c0,1.4-1.1,2.5-2.5,2.5S8,11.9,8,10.5C8,9.1,9.1,8,10.5,8z M15,26c-5,0-9-4-9-9h3c0,3.3,2.7,6,6,6s6-2.7,6-6h3C24,22,20,26,15,26z" /></svg>
- </div>
- </div>
- <figure class='avatar'>
- </figure>
- <figure class='avatar'>
- </figure>
- <figure class='avatar'>
- </figure>
- <figure class='avatar'>
- </figure>
- <figure class='avatar'>
- </figure>
- <figure class='avatar'>
- </figure>
- <figure class='avatar'>
- </figure>
- <figure class='avatar'>
- </figure>
- </div>
css3代码:
CSS Code复制内容到剪贴板- .stage {
- position: absolute;
- top: 0;
- rightright: 0;
- bottombottom: 0;
- left: 0;
- margin: auto;
- height: 460px;
- width: 480px;
- }
- .avatar {
- position: absolute;
- top: 0;
- rightright: 0;
- bottombottom: 0;
- left: 0;
- margin: auto;
- height: 64px;
- width: 64px;
- background-repeat: no-repeat;
- background-size: cover;
- border-radius: 50%;
- -webkit-transform-origin: center;
- -ms-transform-origin: center;
- transform-origin: center;
- }
- .avatar:before {
- content: '';
- position: absolute;
- top: -8%;
- rightright: -8%;
- height: 17.06667px;
- width: 17.06667px;
- background: #bec4bc;
- border-radius: 50%;
- border: 3px solid white;
- }
- .avatar:nth-of-type(1) {
- -webkit-animation: ani1 2s 0.1s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
- animation: ani1 2s 0.1s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
- }
- @-webkit-keyframes ani1 {
- 0%, 20% {
- -webkit-transform: rotate(45deg) translate(0) rotate(-45deg);
- transform: rotate(45deg) translate(0) rotate(-45deg);
- }
- 34%, 100% {
- -webkit-transform: rotate(45deg) translate(208px) rotate(-45deg);
- transform: rotate(45deg) translate(208px) rotate(-45deg);
- }
- }
- @keyframes ani1 {
- 0%, 20% {
- -webkit-transform: rotate(45deg) translate(0) rotate(-45deg);
- transform: rotate(45deg) translate(0) rotate(-45deg);
- }
- 34%, 100% {
- -webkit-transform: rotate(45deg) translate(208px) rotate(-45deg);
- transform: rotate(45deg) translate(208px) rotate(-45deg);
- }
- }
- .avatar:nth-of-type(2) {
- -webkit-animation: ani2 2s 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
- animation: ani2 2s 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
- }
- @-webkit-keyframes ani2 {
- 0%, 20% {
- -webkit-transform: rotate(90deg) translate(0) rotate(-90deg);
- transform: rotate(90deg) translate(0) rotate(-90deg);
- }
- 34%, 100% {
- -webkit-transform: rotate(90deg) translate(208px) rotate(-90deg);
- transform: rotate(90deg) translate(208px) rotate(-90deg);
- }
- }
- @keyframes ani2 {
- 0%, 20% {
- -webkit-transform: rotate(90deg) translate(0) rotate(-90deg);
- transform: rotate(90deg) translate(0) rotate(-90deg);
- }
- 34%, 100% {
- -webkit-transform: rotate(90deg) translate(208px) rotate(-90deg);
- transform: rotate(90deg) translate(208px) rotate(-90deg);
- }
- }
- .avatar:nth-of-type(3) {
- -webkit-animation: ani3 2s 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
- animation: ani3 2s 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
- }
- @-webkit-keyframes ani3 {
- 0%, 20% {
- -webkit-transform: rotate(135deg) translate(0) rotate(-135deg);
- transform: rotate(135deg) translate(0) rotate(-135deg);
- }
- 34%, 100% {
- -webkit-transform: rotate(135deg) translate(208px) rotate(-135deg);
- transform: rotate(135deg) translate(208px) rotate(-135deg);
- }
- }
- @keyframes ani3 {
- 0%, 20% {
- -webkit-transform: rotate(135deg) translate(0) rotate(-135deg);
- transform: rotate(135deg) translate(0) rotate(-135deg);
- }
- 34%, 100% {
- -webkit-transform: rotate(135deg) translate(208px) rotate(-135deg);
- transform: rotate(135deg) translate(208px) rotate(-135deg);
- }
- }
- .avatar:nth-of-type(4) {
- -webkit-animation: ani4 2s 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
- animation: ani4 2s 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
- }
- @-webkit-keyframes ani4 {
- 0%, 20% {
- -webkit-transform: rotate(180deg) translate(0) rotate(-180deg);
- transform: rotate(180deg) translate(0) rotate(-180deg);
- }
- 34%, 100% {
- -webkit-transform: rotate(180deg) translate(208px) rotate(-180deg);
- transform: rotate(180deg) translate(208px) rotate(-180deg);
- }
- }
- @keyframes ani4 {
- 0%, 20% {
- -webkit-transform: rotate(180deg) translate(0) rotate(-180deg);
- transform: rotate(180deg) translate(0) rotate(-180deg);
- }
- 34%, 100% {
- -webkit-transform: rotate(180deg) translate(208px) rotate(-180deg);
- transform: rotate(180deg) translate(208px) rotate(-180deg);
- }
- }
- .avatar:nth-of-type(5) {
- -webkit-animation: ani5 2s 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
- animation: ani5 2s 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
- }
- @-webkit-keyframes ani5 {
- 0%, 20% {
- -webkit-transform: rotate(225deg) translate(0) rotate(-225deg);
- transform: rotate(225deg) translate(0) rotate(-225deg);
- }
- 34%, 100% {
- -webkit-transform: rotate(225deg) translate(208px) rotate(-225deg);
- transform: rotate(225deg) translate(208px) rotate(-225deg);
- }
- }
- @keyframes ani5 {
- 0%, 20% {
- -webkit-transform: rotate(225deg) translate(0) rotate(-225deg);
- transform: rotate(225deg) translate(0) rotate(-225deg);
- }
- 34%, 100% {
- -webkit-transform: rotate(225deg) translate(208px) rotate(-225deg);
- transform: rotate(225deg) translate(208px) rotate(-225deg);
- }
- }
- .avatar:nth-of-type(6) {
- -webkit-animation: ani6 2s 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
- animation: ani6 2s 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
- }
- @-webkit-keyframes ani6 {
- 0%, 20% {
- -webkit-transform: rotate(270deg) translate(0) rotate(-270deg);
- transform: rotate(270deg) translate(0) rotate(-270deg);
- }
- 34%, 100% {
- -webkit-transform: rotate(270deg) translate(208px) rotate(-270deg);
- transform: rotate(270deg) translate(208px) rotate(-270deg);
- }
- }
- @keyframes ani6 {
- 0%, 20% {
- -webkit-transform: rotate(270deg) translate(0) rotate(-270deg);
- transform: rotate(270deg) translate(0) rotate(-270deg);
- }
- 34%, 100% {
- -webkit-transform: rotate(270deg) translate(208px) rotate(-270deg);
- transform: rotate(270deg) translate(208px) rotate(-270deg);
- }
- }
- .avatar:nth-of-type(7) {
- -webkit-animation: ani7 2s 0.7s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
- animation: ani7 2s 0.7s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
- }
- @-webkit-keyframes ani7 {
- 0%, 20% {
- -webkit-transform: rotate(315deg) translate(0) rotate(-315deg);
- transform: rotate(315deg) translate(0) rotate(-315deg);
- }
- 34%, 100% {
- -webkit-transform: rotate(315deg) translate(208px) rotate(-315deg);
- transform: rotate(315deg) translate(208px) rotate(-315deg);
- }
- }
- @keyframes ani7 {
- 0%, 20% {
- -webkit-transform: rotate(315deg) translate(0) rotate(-315deg);
- transform: rotate(315deg) translate(0) rotate(-315deg);
- }
- 34%, 100% {
- -webkit-transform: rotate(315deg) translate(208px) rotate(-315deg);
- transform: rotate(315deg) translate(208px) rotate(-315deg);
- }
- }
- .avatar:nth-of-type(8) {
- -webkit-animation: ani8 2s 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
- animation: ani8 2s 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
- }
- @-webkit-keyframes ani8 {
- 0%, 20% {
- -webkit-transform: rotate(360deg) translate(0) rotate(-360deg);
- transform: rotate(360deg) translate(0) rotate(-360deg);
- }
- 34%, 100% {
- -webkit-transform: rotate(360deg) translate(208px) rotate(-360deg);
- transform: rotate(360deg) translate(208px) rotate(-360deg);
- }
- }
- @keyframes ani8 {
- 0%, 20% {
- -webkit-transform: rotate(360deg) translate(0) rotate(-360deg);
- transform: rotate(360deg) translate(0) rotate(-360deg);
- }
- 34%, 100% {
- -webkit-transform: rotate(360deg) translate(208px) rotate(-360deg);
- transform: rotate(360deg) translate(208px) rotate(-360deg);
- }
- }
- .avatar:nth-of-type(4):before, .avatar:nth-of-type(2):before {
- -webkit-animation: bounce 3s 1.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards, colorchange 1s 1.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
- animation: bounce 3s 1.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards, colorchange 1s 1.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
- }
- .avatar:nth-of-type(7):before {
- -webkit-animation: bounce 3s 2s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards, colorchange 1s 2s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
- animation: bounce 3s 2s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards, colorchange 1s 2s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
- }
- .avatar:nth-of-type(3):before {
- -webkit-animation: bounce 3s 2.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards, colorchange 1s 2.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
- animation: bounce 3s 2.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards, colorchange 1s 2.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
- }
- .avatar:nth-of-type(1):before {
- -webkit-animation: bounce 3s 3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards, colorchange 1s 3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
- animation: bounce 3s 3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards, colorchange 1s 3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
- }
- .avatar:nth-of-type(6):before {
- -webkit-animation: bounce 3s 3.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards, colorchange 1s 3.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
- animation: bounce 3s 3.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards, colorchange 1s 3.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
- }
- .avatar:nth-of-type(5):before {
- -webkit-animation: bounce 3s 3.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards, colorchange 1s 3.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
- animation: bounce 3s 3.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards, colorchange 1s 3.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
- }
- .avatar:nth-of-type(8):before {
- -webkit-animation: bounce 3s 4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards, colorchange 1s 4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
- animation: bounce 3s 4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards, colorchange 1s 4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
- }
- .image {
- position: absolute;
- top: 0;
- rightright: 0;
- bottombottom: 0;
- left: 0;
- margin: auto;
- height: 220px;
- width: 220px;
- }
- .image img {
- position: relative;
- height: 220px;
- width: 220px;
- border-radius: 50%;
- z-index: 1;
- }
- .image:before {
- position: absolute;
- top: 0;
- rightright: 0;
- bottombottom: 0;
- left: 0;
- margin: auto;
- content: '';
- height: 100%;
- width: 100%;
- background: #f9fff7;
- border: 3px solid #e7f5d1;
- border-radius: 50%;
- -webkit-animation: pulse 1s 1.4s ease-out;
- animation: pulse 1s 1.4s ease-out;
- -webkit-animation-iteration-count: 3;
- animation-iteration-count: 3;
- }
- .image .smiley {
- position: absolute;
- top: -8px;
- rightright: -8px;
- height: 64px;
- width: 64px;
- background: #b5e763;
- border-radius: 50%;
- border: 5px solid white;
- -webkit-animation: bounce 5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
- animation: bounce 5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
- -webkit-transform-origin: center;
- -ms-transform-origin: center;
- transform-origin: center;
- z-index: 1;
- }
- .image .smiley svg {
- position: absolute;
- top: 0;
- rightright: 0;
- bottombottom: 0;
- left: 0;
- margin: auto;
- -webkit-animation: bounce 5s 0.075s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
- animation: bounce 5s 0.075s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
- }
- @-webkit-keyframes bounce {
- 0% {
- -webkit-transform: scale(0);
- transform: scale(0);
- }
- 5% {
- -webkit-transform: scale(1.5);
- transform: scale(1.5);
- }
- 10%, 100% {
- -webkit-transform: scale(1);
- transform: scale(1);
- }
- }
- @keyframes bounce {
- 0% {
- -webkit-transform: scale(0);
- transform: scale(0);
- }
- 5% {
- -webkit-transform: scale(1.5);
- transform: scale(1.5);
- }
- 10%, 100% {
- -webkit-transform: scale(1);
- transform: scale(1);
- }
- }
- @-webkit-keyframes pulse {
- 0% {
- -webkit-transform: scale(0.1, 0.1);
- transform: scale(0.1, 0.1);
- opacity: 0.0;
- }
- 50% {
- opacity: 1.0;
- }
- 100% {
- -webkit-transform: scale(3);
- transform: scale(3);
- opacity: 0.0;
- }
- }
- @keyframes pulse {
- 0% {
- -webkit-transform: scale(0.1, 0.1);
- transform: scale(0.1, 0.1);
- opacity: 0.0;
- }
- 50% {
- opacity: 1.0;
- }
- 100% {
- -webkit-transform: scale(3);
- transform: scale(3);
- opacity: 0.0;
- }
- }
- @-webkit-keyframes colorchange {
- 0% {
- background: #bec4bc;
- }
- 100% {
- background: #b5e763;
- }
- }
- @keyframes colorchange {
- 0% {
- background: #bec4bc;
- }
- 100% {
- background: #b5e763;
- }
- }
- .avatar:nth-of-type(1) {
- background-image: url("128.jpg");
- }
- .avatar:nth-of-type(2) {
- background-image: url("rasagy.jpg");
- }
- .avatar:nth-of-type(3) {
- background-image: url("geeftvorm.jpg");
- }
- .avatar:nth-of-type(4) {
- background-image: url("VinThomas.jpg");
- }
- .avatar:nth-of-type(5) {
- background-image: url("ladylexy.jpg");
- }
- .avatar:nth-of-type(6) {
- background-image: url("claudioguglieri.jpg");
- }
- .avatar:nth-of-type(7) {
- background-image: url("jina.jpg");
- }
- .avatar:nth-of-type(8) {
- background-image: url("peterme.jpg");
- }
好了以上就是今天介绍的html5和css3动画排列人物头像代码演示,谢谢阅读,希望能帮到大家,请继续关注,我们会努力分享更多优秀的文章。
DDR爱好者之家 Design By 杰米
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
DDR爱好者之家 Design By 杰米
暂无评论...
《魔兽世界》大逃杀!60人新游玩模式《强袭风暴》3月21日上线
暴雪近日发布了《魔兽世界》10.2.6 更新内容,新游玩模式《强袭风暴》即将于3月21 日在亚服上线,届时玩家将前往阿拉希高地展开一场 60 人大逃杀对战。
艾泽拉斯的冒险者已经征服了艾泽拉斯的大地及遥远的彼岸。他们在对抗世界上最致命的敌人时展现出过人的手腕,并且成功阻止终结宇宙等级的威胁。当他们在为即将于《魔兽世界》资料片《地心之战》中来袭的萨拉塔斯势力做战斗准备时,他们还需要在熟悉的阿拉希高地面对一个全新的敌人──那就是彼此。在《巨龙崛起》10.2.6 更新的《强袭风暴》中,玩家将会进入一个全新的海盗主题大逃杀式限时活动,其中包含极高的风险和史诗级的奖励。
《强袭风暴》不是普通的战场,作为一个独立于主游戏之外的活动,玩家可以用大逃杀的风格来体验《魔兽世界》,不分职业、不分装备(除了你在赛局中捡到的),光是技巧和战略的强弱之分就能决定出谁才是能坚持到最后的赢家。本次活动将会开放单人和双人模式,玩家在加入海盗主题的预赛大厅区域前,可以从强袭风暴角色画面新增好友。游玩游戏将可以累计名望轨迹,《巨龙崛起》和《魔兽世界:巫妖王之怒 经典版》的玩家都可以获得奖励。
更新日志
2024年11月24日
2024年11月24日
- 凤飞飞《我们的主题曲》飞跃制作[正版原抓WAV+CUE]
- 刘嘉亮《亮情歌2》[WAV+CUE][1G]
- 红馆40·谭咏麟《歌者恋歌浓情30年演唱会》3CD[低速原抓WAV+CUE][1.8G]
- 刘纬武《睡眠宝宝竖琴童谣 吉卜力工作室 白噪音安抚》[320K/MP3][193.25MB]
- 【轻音乐】曼托凡尼乐团《精选辑》2CD.1998[FLAC+CUE整轨]
- 邝美云《心中有爱》1989年香港DMIJP版1MTO东芝首版[WAV+CUE]
- 群星《情叹-发烧女声DSD》天籁女声发烧碟[WAV+CUE]
- 刘纬武《睡眠宝宝竖琴童谣 吉卜力工作室 白噪音安抚》[FLAC/分轨][748.03MB]
- 理想混蛋《Origin Sessions》[320K/MP3][37.47MB]
- 公馆青少年《我其实一点都不酷》[320K/MP3][78.78MB]
- 群星《情叹-发烧男声DSD》最值得珍藏的完美男声[WAV+CUE]
- 群星《国韵飘香·贵妃醉酒HQCD黑胶王》2CD[WAV]
- 卫兰《DAUGHTER》【低速原抓WAV+CUE】
- 公馆青少年《我其实一点都不酷》[FLAC/分轨][398.22MB]
- ZWEI《迟暮的花 (Explicit)》[320K/MP3][57.16MB]