您的位置:首页 > 网页 css特效
站内搜索

css特效

1.页面淡入淡出

加载中...

2.左右反转loading








转自其他文章:css3 loading

http://www.cnblogs.com/lhb25/p/loading-spinners-animated-with-css3.html

Loading 动画效果一

HTML 代码:

1234567class="spinner"> class="rect1"> class="rect2"> class="rect3"> class="rect4"> class="rect5">

CSS 代码:

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152.spinner { margin: 100px auto; width: 50px; height: 60px; text-align: center; font-size: 10px;} .spinner > div { background-color: #67CF22; height: 100%; width: 6px; display: inline-block; -webkit-animation: stretchdelay 1.2s infinite ease-in-out; animation: stretchdelay 1.2s infinite ease-in-out;} .spinner .rect2 { -webkit-animation-delay: -1.1s; animation-delay: -1.1s;} .spinner .rect3 { -webkit-animation-delay: -1.0s; animation-delay: -1.0s;} .spinner .rect4 { -webkit-animation-delay: -0.9s; animation-delay: -0.9s;} .spinner .rect5 { -webkit-animation-delay: -0.8s; animation-delay: -0.8s;} @-webkit-keyframes stretchdelay { 0%, 40%, 100% { -webkit-transform: scaleY(0.4) } 20% { -webkit-transform: scaleY(1.0) }} @keyframes stretchdelay { 0%, 40%, 100% { transform: scaleY(0.4); -webkit-transform: scaleY(0.4); } 20% { transform: scaleY(1.0); -webkit-transform: scaleY(1.0); }}

Loading 动画效果二

HTML 代码:

1class="spinner">

CSS 代码:

12345678910111213141516171819202122232425262728.spinner { width: 60px; height: 60px; background-color: #67CF22; margin: 100px auto; -webkit-animation: rotateplane 1.2s infinite ease-in-out; animation: rotateplane 1.2s infinite ease-in-out;} @-webkit-keyframes rotateplane { 0% { -webkit-transform: perspective(120px) } 50% { -webkit-transform: perspective(120px) rotateY(180deg) } 100% { -webkit-transform: perspective(120px) rotateY(180deg) rotateX(180deg) }} @keyframes rotateplane { 0% { transform: perspective(120px) rotateX(0deg) rotateY(0deg); -webkit-transform: perspective(120px) rotateX(0deg) rotateY(0deg) } 50% { transform: perspective(120px) rotateX(-180.1deg) rotateY(0deg); -webkit-transform: perspective(120px) rotateX(-180.1deg) rotateY(0deg) } 100% { transform: perspective(120px) rotateX(-180deg) rotateY(-179.9deg); -webkit-transform: perspective(120px) rotateX(-180deg) rotateY(-179.9deg); }}

Loading 动画效果三

HTML 代码:

1234class="spinner"> class="double-bounce1"> class="double-bounce2">

CSS 代码:

1234567891011121314151617181920212223242526272829303132333435363738394041.spinner { width: 60px; height: 60px; position: relative; margin: 100px auto;} .double-bounce1, .double-bounce2 { width: 100%; height: 100%; border-radius: 50%; background-color: #67CF22; opacity: 0.6; position: absolute; top: 0; left: 0; -webkit-animation: bounce 2.0s infinite ease-in-out; animation: bounce 2.0s infinite ease-in-out;} .double-bounce2 { -webkit-animation-delay: -1.0s; animation-delay: -1.0s;} @-webkit-keyframes bounce { 0%, 100% { -webkit-transform: scale(0.0) } 50% { -webkit-transform: scale(1.0) }} @keyframes bounce { 0%, 100% { transform: scale(0.0); -webkit-transform: scale(0.0); } 50% { transform: scale(1.0); -webkit-transform: scale(1.0); }}

Loading 动画效果四

HTML 代码:

1234"spinner"> "cube1"> "cube2">

CSS 代码:

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849.spinner { margin: 100px auto; width: 32px; height: 32px; position: relative;} .cube1, .cube2 { background-color: #67CF22; width: 30px; height: 30px; position: absolute; top: 0; left: 0; -webkit-animation: cubemove 1.8s infinite ease-in-out; animation: cubemove 1.8s infinite ease-in-out;} .cube2 { -webkit-animation-delay: -0.9s; animation-delay: -0.9s;} @-webkit-keyframes cubemove { 25% { -webkit-transform: translateX(42px) rotate(-90deg) scale(0.5) } 50% { -webkit-transform: translateX(42px) translateY(42px) rotate(-180deg) } 75% { -webkit-transform: translateX(0px) translateY(42px) rotate(-270deg) scale(0.5) } 100% { -webkit-transform: rotate(-360deg) }} @keyframes cubemove { 25% { transform: translateX(42px) rotate(-90deg) scale(0.5); -webkit-transform: translateX(42px) rotate(-90deg) scale(0.5); } 50% { transform: translateX(42px) translateY(42px) rotate(-179deg); -webkit-transform: translateX(42px) translateY(42px) rotate(-179deg); } 50.1% { transform: translateX(42px) translateY(42px) rotate(-180deg); -webkit-transform: translateX(42px) translateY(42px) rotate(-180deg); } 75% { transform: translateX(0px) translateY(42px) rotate(-270deg) scale(0.5); -webkit-transform: translateX(0px) translateY(42px) rotate(-270deg) scale(0.5); } 100% { transform: rotate(-360deg); -webkit-transform: rotate(-360deg); }}

Loading 动画效果五

HTML 代码:

1234"spinner"> "dot1"> "dot2">

CSS 代码:

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748.spinner { margin: 100px auto; width: 90px; height: 90px; position: relative; text-align: center; -webkit-animation: rotate 2.0s infinite linear; animation: rotate 2.0s infinite linear;} .dot1, .dot2 { width: 60%; height: 60%; display: inline-block; position: absolute; top: 0; background-color: #67CF22; border-radius: 100%; -webkit-animation: bounce 2.0s infinite ease-in-out; animation: bounce 2.0s infinite ease-in-out;} .dot2 { top: auto; bottom: 0px; -webkit-animation-delay: -1.0s; animation-delay: -1.0s;} @-webkit-keyframes rotate { 100% { -webkit-transform: rotate(360deg) }}@keyframes rotate { 100% { transform: rotate(360deg); -webkit-transform: rotate(360deg) }} @-webkit-keyframes bounce { 0%, 100% { -webkit-transform: scale(0.0) } 50% { -webkit-transform: scale(1.0) }} @keyframes bounce { 0%, 100% { transform: scale(0.0); -webkit-transform: scale(0.0); } 50% { transform: scale(1.0); -webkit-transform: scale(1.0); }}

Loading 动画效果六

&nb
  • 上一篇:CSS3弹性盒模型flex box快速入门 2016.03.16
  • 下一篇:CSS选择器