html幸运大转盘,HTML5+Fontawesome 幸运大转盘

CSS

语言:

CSSSCSS

确定

* {

margin: 0;

padding: 0;

}

body {

background: #eaeaea;

color: #fff;

font-size: 18px;

font-family: 'Exo 2', sans-serif;

}

a {

color: #34495e;

/*WRAPPER*/

}

#wrapper {

margin: 40px auto 0;

width: 266px;

position: relative;

}

#txt {

color: #eaeaea;

/*WHEEL*/

}

#wheel {

width: 250px;

height: 250px;

border-radius: 50%;

position: relative;

overflow: hidden;

border: 8px solid #fff;

box-shadow: rgba(0, 0, 0, 0.2) 0px 0px 10px, rgba(0, 0, 0, 0.05) 0px 3px 0px;

transform: rotate(0deg);

}

#wheel:before {

content: '';

position: absolute;

border: 4px solid rgba(0, 0, 0, 0.1);

width: 242px;

height: 242px;

border-radius: 50%;

z-index: 1000;

}

#inner-wheel {

width: 100%;

height: 100%;

-webkit-transition: all 7s cubic-bezier(0, 0.99, 0.44, 0.99);

-moz-transition: all 7s cubic-bezier(0, 0.99, 0.44, 0.99);

-o-transition: all 7s cubic-bezier(0, 0.99, 0.44, 0.99);

-ms-transition: all 7s cubic-bezier(0, 0.99, 0.44, 0.99);

transition: all 7s cubic-bezier(0, 0.99, 0.44, 0.99);

}

#wheel div.sec {

position: absolute;

width: 0;

height: 0;

border-style: solid;

border-width: 130px 75px 0;

border-color: #19c transparent;

transform-origin: 75px 129px;

left: 50px;

top: -4px;

opacity: 1;

}

#wheel div.sec:nth-child(1) {

transform: rotate(60deg);

-webkit-transform: rotate(60deg);

-moz-transform: rotate(60deg);

-o-transform: rotate(60deg);

-ms-transform: rotate(60deg);

border-color: #16a085 transparent;

}

#wheel div.sec:nth-child(2) {

transform: rotate(120deg);

-webkit-transform: rotate(120deg);

-moz-transform: rotate(120deg);

-o-transform: rotate(120deg);

-ms-transform: rotate(120deg);

border-color: #2980b9 transparent;

}

#wheel div.sec:nth-child(3) {

transform: rotate(180deg);

-webkit-transform: rotate(180deg);

-moz-transform: rotate(180deg);

-o-transform: rotate(180deg);

-ms-transform: rotate(180deg);

border-color: #34495e transparent;

}

#wheel div.sec:nth-child(4) {

transform: rotate(240deg);

-webkit-transform: rotate(240deg);

-moz-transform: rotate(240deg);

-o-transform: rotate(240deg);

-ms-transform: rotate(240deg);

border-color: #f39c12 transparent;

}

#wheel div.sec:nth-child(5) {

transform: rotate(300deg);

-webkit-transform: rotate(300deg);

-moz-transform: rotate(300deg);

-o-transform: rotate(300deg);

-ms-transform: rotate(300deg);

border-color: #d35400 transparent;

}

#wheel div.sec:nth-child(6) {

transform: rotate(360deg);

-webkit-transform: rotate(360deg);

-moz-transform: rotate(360deg);

-o-transform: rotate(360deg);

-ms-transform: rotate(360deg);

border-color: #c0392b transparent;

}

#wheel div.sec .fa {

margin-top: -100px;

color: rgba(0, 0, 0, 0.2);

position: relative;

z-index: 10000000;

display: block;

text-align: center;

font-size: 36px;

margin-left: -15px;

text-shadow: rgba(255, 255, 255, 0.1) 0px -1px 0px, rgba(0, 0, 0, 0.2) 0px 1px 0px;

}

#spin {

width: 68px;

height: 68px;

position: absolute;

top: 50%;

left: 50%;

margin: -34px 0 0 -34px;

border-radius: 50%;

box-shadow: rgba(0, 0, 0, 0.1) 0px 3px 0px;

z-index: 1000;

background: #fff;

cursor: pointer;

font-family: 'Exo 2', sans-serif;

}

#spin:after {

content: "SPIN";

text-align: center;

line-height: 68px;

color: #ccc;

text-shadow: 0 2px 0 #fff, 0 -2px 0 rgba(0, 0, 0, 0.3);

position: relative;

z-index: 100000;

width: 68px;

height: 68px;

display: block;

}

#spin:before {

content: "";

position: absolute;

width: 0;

height: 0;

border-style: solid;

border-width: 0 20px 28px 20px;

border-color: transparent transparent #fff transparent;

top: -12px;

left: 14px;

}

#inner-spin {

width: 54px;

height: 54px;

position: absolute;

top: 50%;

left: 50%;

margin: -27px 0 0 -27px;

border-radius: 50%;

background: red;

z-index: 999;

box-shadow: #fff 0px -2px 0px inset, #fff 0px 2px 0px inset, rgba(0, 0, 0, 0.4) 0px 0px 5px;

/* Old browsers */

background: #fff;

/* FF3.6+ */

background: -moz-radial-gradient(center, ellipse cover, #fff 0%, #eaeaea 100%);

/* Chrome,Safari4+ */

background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%, #fff), color-stop(100%, #eaeaea));

/* Chrome10+,Safari5.1+ */

background: -webkit-radial-gradient(center, ellipse cover, #fff 0%, #eaeaea 100%);

/* Opera 12+ */

background: -o-radial-gradient(center, ellipse cover, #fff 0%, #eaeaea 100%);

/* IE10+ */

background: -ms-radial-gradient(center, ellipse cover, #fff 0%, #eaeaea 100%);

/* W3C */

background: radial-gradient(ellipse at center, #fff 0%, #eaeaea 100%);

/* IE6-9 fallback on horizontal gradient */

filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#eaeaea', GradientType=1);

}

#spin:active #inner-spin {

box-shadow: rgba(0, 0, 0, 0.4) 0px 0px 5px inset;

}

#spin:active:after {

font-size: 15px;

}

#shine {

width: 250px;

height: 250px;

position: absolute;

top: 0;

left: 0;

/* FF3.6+ */

background: -moz-radial-gradient(center, ellipse cover, #fff 0%, rgba(255, 255, 255, 0.99) 1%, rgba(255, 255, 255, 0.91) 9%, rgba(255, 255, 255, 0) 100%);

/* Chrome,Safari4+ */

background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%, #fff), color-stop(1%, rgba(255, 255, 255, 0.99)), color-stop(9%, rgba(255, 255, 255, 0.91)), color-stop(100%, rgba(255, 255, 255, 0)));

/* Chrome10+,Safari5.1+ */

background: -webkit-radial-gradient(center, ellipse cover, #fff 0%, rgba(255, 255, 255, 0.99) 1%, rgba(255, 255, 255, 0.91) 9%, rgba(255, 255, 255, 0) 100%);

/* Opera 12+ */

background: -o-radial-gradient(center, ellipse cover, #fff 0%, rgba(255, 255, 255, 0.99) 1%, rgba(255, 255, 255, 0.91) 9%, rgba(255, 255, 255, 0) 100%);

/* IE10+ */

background: -ms-radial-gradient(center, ellipse cover, #fff 0%, rgba(255, 255, 255, 0.99) 1%, rgba(255, 255, 255, 0.91) 9%, rgba(255, 255, 255, 0) 100%);

/* W3C */

background: radial-gradient(ellipse at center, #fff 0%, rgba(255, 255, 255, 0.99) 1%, rgba(255, 255, 255, 0.91) 9%, rgba(255, 255, 255, 0) 100%);

/* IE6-9 fallback on horizontal gradient */

filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#00ffffff', GradientType=1);

opacity: 0.1;

/*ANIMATION*/

}

@-webkit-keyframes hh {

0%, 100% {

transform: rotate(0deg);

-webkit-transform: rotate(0deg);

}

50% {

transform: rotate(7deg);

-webkit-transform: rotate(7deg);

}

}

@keyframes hh {

0%, 100% {

transform: rotate(0deg);

-webkit-transform: rotate(0deg);

}

50% {

transform: rotate(7deg);

-webkit-transform: rotate(7deg);

}

}

.spin {

/* Chrome, Safari, Opera */

-webkit-animation: hh 0.1s;

animation: hh 0.1s;

}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值