js实现一个简单的大转盘抽奖效果代码

代码语言:html

所属分类:大转盘

代码描述:js实现一个简单的大转盘抽奖效果代码

代码标签: 简单 转盘 抽奖 效果

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <title></title>

<style type="text/css">
    *{margin: 0;padding: 0;box-sizing: border-box;}
    	#rotateBox{margin: 100px; position: relative;width: 300px;height: 300px;}
        #rotateBox div{position: absolute; left: 0;top: 0;width: 100%;height: 100%;z-index: 10;background: url(//repo.bfw.wiki/bfwrepo/images/zhuanpan/g.png) no-repeat;background-size: 100%}
        #rotateBox button{ -webkit-transition: all .2s ease; background: red;position: absolute; z-index: 20;width: 70px;height: 70px;color: #fff;border:none;border-radius: 0 80px 80px 80px;left: 50%;top: 50%;margin-left: -35px;margin-top: -35px;-webkit-transform: rotate(45deg);cursor: pointer; outline: none;}
        #rotateBox button span{font-size: 16px;display: block; font-weight: bold;-webkit-transform: rotate(-45deg);}
        #starts.none{background: #999;-webkit-transform:rotate(45deg) scale(.9);}
</style>

</head>
<body>
    <div id="rotateBox">
        <div id="rot22"></div>
        <button id="starts"><span>开始</span></button>
    </div>

    <script>
        class Rotate {
        constructor(dom,json) {
            this.dom = document.........完整代码请登录后点击上方下载按钮下载查看

网友评论0