| Дата: Четверг, 12.03.2015, 08:30 | Сообщение # 1 |
Группа: Администраторы
Сообщений: 1530
|
Для наглядности(и чтобы было понятнее в кодах) привожу пример кнопку в двух цветовых решениях
Все запрограммировано в CCS стилях
---------------------------------------- body{background:#555;}
#uptocall-mini {position:fixed;top:100px;right:100px;cursor:pointer;opacity:0.3;z-index:999;}
#uptocall-mini .uptocall-mini-phone {-moz-border-radius:50% !important;-webkit-border-radius:50% !important;border-radius:50% !important;-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;background-color:rgb(23,167,167); width:70px;height:70px;-webkit-animation: uptocallmini 1.5s 0s ease-out infinite;-moz-animation: uptocallmini 1.5s 0s ease-out infinite;animation: uptocallmini 1.5s 0s ease-out infinite;}
#uptocall-mini .uptocall-mini-phone:before {content: "";position: absolute;width: 100%;height: 100%;top:0;left:0;background-image:url(//uptocall.com/widget/images/mini.png);background-repeat:no-repeat;background-position:center center; -webkit-animation: uptocallphone 1.5s linear infinite;-moz-animation: uptocallphone 1.5s linear infinite;animation: uptocallphone 1.5s linear infinite;}
#uptocall-mini2 {position:fixed;top:300px;right:100px;cursor:pointer;opacity:0.3;z-index:999;}
#uptocall-mini2 .uptocall-mini-phone {-moz-border-radius:50% !important;-webkit-border-radius:50% !important;border-radius:50% !important;-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;background-color:rgb(235,17,17); width:70px;height:70px;-webkit-animation: uptocallmini 1.5s 0s ease-out infinite;-moz-animation: uptocallmini 1.5s 0s ease-out infinite;animation: uptocallmini 1.5s 0s ease-out infinite;}
#uptocall-mini2 .uptocall-mini-phone:before {content: "";position: absolute;width: 100%;height: 100%;top:0;left:0;background-image:url(//uptocall.com/widget/images/mini.png);background-repeat:no-repeat;background-position:center center; -webkit-animation: uptocallphone 1.5s linear infinite;-moz-animation: uptocallphone 1.5s linear infinite;animation: uptocallphone 1.5s linear infinite;}
#uptocall-mini:hover {opacity:0.8;} #uptocall-mini2:hover {opacity:0.8;}
#uptocall-mini:hover .uptocall-mini-phone {-webkit-animation:uptocallmini2 1s 0.4s ease-out infinite;-moz-animation: uptocallmini2 1s 0.4s ease-out infinite;animation: uptocallmini2 1s 0.4s ease-out infinite;}
#uptocall-mini2:hover .uptocall-mini-phone {-webkit-animation:uptocallmini22 1s 0.4s ease-out infinite;-moz-animation: uptocallmini22 1s 0.4s ease-out infinite;animation: uptocallmini22 1s 0.4s ease-out infinite;}
@-webkit-keyframes uptocallphone { 0% {-ms-transform:rotate(0deg);-webkit-transform:rotate(0deg);transform:rotate(0deg);} 25% {-ms-transform:rotate(30deg);-webkit-transform:rotate(30deg);transform:rotate(30deg);} 50% {-ms-transform:rotate(0deg);-webkit-transform:rotate(0deg);transform:rotate(0deg);} 75% {-ms-transform:rotate(-30deg);-webkit-transform:rotate(-30deg);transform:rotate(-30deg);} 100% {-ms-transform:rotate(0deg);-webkit-transform:rotate(0deg);transform:rotate(0deg);} } @-moz-keyframes uptocallphone { 0% {-ms-transform:rotate(0deg);-webkit-transform:rotate(0deg);transform:rotate(0deg);} 25% {-ms-transform:rotate(30deg);-webkit-transform:rotate(30deg);transform:rotate(30deg);} 50% {-ms-transform:rotate(0deg);-webkit-transform:rotate(0deg);transform:rotate(0deg);} 75% {-ms-transform:rotate(-30deg);-webkit-transform:rotate(-30deg);transform:rotate(-30deg);} 100% {-ms-transform:rotate(0deg);-webkit-transform:rotate(0deg);transform:rotate(0deg);} } @keyframes uptocallphone { 0% {-ms-transform:rotate(0deg);-webkit-transform:rotate(0deg);transform:rotate(0deg);} 25% {-ms-transform:rotate(30deg);-webkit-transform:rotate(30deg);transform:rotate(30deg);} 50% {-ms-transform:rotate(0deg);-webkit-transform:rotate(0deg);transform:rotate(0deg);} 75% {-ms-transform:rotate(-30deg);-webkit-transform:rotate(-30deg);transform:rotate(-30deg);} 100% {-ms-transform:rotate(0deg);-webkit-transform:rotate(0deg);transform:rotate(0deg);} } @-webkit-keyframes uptocallphone2 { 0% {-ms-transform:rotate(0deg);-webkit-transform:rotate(0deg);transform:rotate(0deg);} 25% {-ms-transform:rotate(30deg);-webkit-transform:rotate(30deg);transform:rotate(30deg);} 50% {-ms-transform:rotate(0deg);-webkit-transform:rotate(0deg);transform:rotate(0deg);} 75% {-ms-transform:rotate(-30deg);-webkit-transform:rotate(-30deg);transform:rotate(-30deg);} 100% {-ms-transform:rotate(0deg);-webkit-transform:rotate(0deg);transform:rotate(0deg);} } @-moz-keyframes uptocallphone2 { 0% {-ms-transform:rotate(0deg);-webkit-transform:rotate(0deg);transform:rotate(0deg);} 25% {-ms-transform:rotate(30deg);-webkit-transform:rotate(30deg);transform:rotate(30deg);} 50% {-ms-transform:rotate(0deg);-webkit-transform:rotate(0deg);transform:rotate(0deg);} 75% {-ms-transform:rotate(-30deg);-webkit-transform:rotate(-30deg);transform:rotate(-30deg);} 100% {-ms-transform:rotate(0deg);-webkit-transform:rotate(0deg);transform:rotate(0deg);} } @keyframes uptocallphone2 { 0% {-ms-transform:rotate(0deg);-webkit-transform:rotate(0deg);transform:rotate(0deg);} 25% {-ms-transform:rotate(30deg);-webkit-transform:rotate(30deg);transform:rotate(30deg);} 50% {-ms-transform:rotate(0deg);-webkit-transform:rotate(0deg);transform:rotate(0deg);} 75% {-ms-transform:rotate(-30deg);-webkit-transform:rotate(-30deg);transform:rotate(-30deg);} 100% {-ms-transform:rotate(0deg);-webkit-transform:rotate(0deg);transform:rotate(0deg);} }
@-webkit-keyframes uptocallmini { 0% {box-shadow: 0 0 8px 6px rgba(23,167,167, 0), 0 0 0px 0px rgba(0,0,0,0), 0 0 0px 0px rgba(23,167,167, 0);} 10% {box-shadow: 0 0 8px 6px #1affb3, 0 0 12px 10px rgba(0,0,0,0), 0 0 12px 14px #1affb3;} 100% {box-shadow: 0 0 8px 6px rgba(23,167,167, 0), 0 0 0px 40px rgba(0,0,0,0), 0 0 0px 40px rgba(23,167,167, 0);} } @-moz-keyframes uptocallmini { 0% {box-shadow: 0 0 8px 6px rgba(23,167,167, 0), 0 0 0px 0px rgba(0,0,0,0), 0 0 0px 0px rgba(23,167,167, 0);} 10% {box-shadow: 0 0 8px 6px #1affb3, 0 0 12px 10px rgba(0,0,0,0), 0 0 12px 14px #1affb3;} 100% {box-shadow: 0 0 8px 6px rgba(23,167,167, 0), 0 0 0px 40px rgba(0,0,0,0), 0 0 0px 40px rgba(23,167,167, 0);} } @keyframes uptocallmini { 0% {box-shadow: 0 0 8px 6px rgba(23,167,167, 0), 0 0 0px 0px rgba(0,0,0,0), 0 0 0px 0px rgba(23,167,167, 0);} 10% {box-shadow: 0 0 8px 6px #1affb3, 0 0 12px 10px rgba(0,0,0,0), 0 0 12px 14px #1affb3;} 100% {box-shadow: 0 0 8px 6px rgba(23,167,167, 0), 0 0 0px 40px rgba(0,0,0,0), 0 0 0px 40px rgba(23,167,167, 0);} } @-webkit-keyframes uptocallmini2 { 0% {box-shadow: 0 0 8px 6px rgba(23,167,167, 0), 0 0 0px 0px rgba(0,0,0,0), 0 0 0px 0px rgba(23,167,167, 0);} 10% {box-shadow: 0 0 8px 6px #1affb3, 0 0 12px 10px rgba(0,0,0,0), 0 0 12px 14px #1affb3;} 100% {box-shadow: 0 0 8px 6px rgba(23,167,167, 0), 0 0 0px 40px rgba(0,0,0,0), 0 0 0px 40px rgba(23,167,167, 0);} } @-moz-keyframes uptocallmini2 { 0% {box-shadow: 0 0 8px 6px rgba(23,167,167, 0), 0 0 0px 0px rgba(0,0,0,0), 0 0 0px 0px rgba(23,167,167, 0);} 10% {box-shadow: 0 0 8px 6px #1affb3, 0 0 12px 10px rgba(0,0,0,0), 0 0 12px 14px #1affb3;} 100% {box-shadow: 0 0 8px 6px rgba(23,167,167, 0), 0 0 0px 40px rgba(0,0,0,0), 0 0 0px 40px rgba(23,167,167, 0);} } @keyframes uptocallmini2 { 0% {box-shadow: 0 0 8px 6px rgba(23,167,167, 0), 0 0 0px 0px rgba(0,0,0,0), 0 0 0px 0px rgba(23,167,167, 0);} 10% {box-shadow: 0 0 8px 6px #1affb3, 0 0 12px 10px rgba(0,0,0,0), 0 0 12px 14px #1affb3;} 100% {box-shadow: 0 0 8px 6px rgba(23,167,167, 0), 0 0 0px 40px rgba(0,0,0,0), 0 0 0px 40px rgba(23,167,167, 0);} }
@-webkit-keyframes uptocallmini22 { 0% {box-shadow: 0 0 8px 6px rgba(235,17,17, 0), 0 0 0px 0px rgba(0,0,0,0), 0 0 0px 0px rgba(235,17,17, 0);} 10% {box-shadow: 0 0 8px 6px #ff0, 0 0 12px 10px rgba(0,0,0,0), 0 0 12px 14px #f00;} 100% {box-shadow: 0 0 8px 6px rgba(235,17,17, 0), 0 0 0px 40px rgba(0,0,0,0), 0 0 0px 40px rgba(235,17,17, 0);} } @-moz-keyframes uptocallmini22 { 0% {box-shadow: 0 0 8px 6px rgba(235,10,10, 0), 0 0 0px 0px rgba(0,0,0,0), 0 0 0px 0px rgba(235,17,17, 0);} 10% {box-shadow: 0 0 8px 6px #f00, 0 0 12px 10px rgba(0,0,0,0), 0 0 12px 14px #f00;} 100% {box-shadow: 0 0 8px 6px rgba(235,17,17, 0), 0 0 0px 40px rgba(0,0,0,0), 0 0 0px 40px rgba(235,17,17, 0);} } /*@keyframes uptocallmini22 { 0% {box-shadow: 0 0 8px 6px rgba(235,17,17, 0), 0 0 0px 0px rgba(0,0,0,0), 0 0 0px 0px rgba(235,17,17, 0);} 10% {box-shadow: 0 0 8px 6px #1affb3, 0 0 12px 10px rgba(0,0,0,0), 0 0 12px 14px #1affb3;} 100% {box-shadow: 0 0 8px 6px rgba(235,17,17, 0), 0 0 0px 40px rgba(0,0,0,0), 0 0 0px 40px rgba(235,17,17, 0);} }*/ -----------------------------------------
Рабочий пример с кодами http://codepen.io/anikey99/pen/XJxaLX
|
|
| |