Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <!DOCTYPE html>
<html>
	<head>
		<title>taper</title>
	</head>
	<body>
		<div id="main"> 
        <div id="mxwidth">
            <ul id="boxes">
                <li class="tape"><img src="https://pp.userapi.com/c851532/v851532508/15281f/HID0UQTAJGM.jpg" alt="1" class="tape-img"></li>
                <li class="tape"><img src="https://pp.userapi.com/c851532/v851532508/152826/wjzAUrH-pdw.jpg" alt="2" class="tape-img"></li>
                <li class="tape"><img src="https://pp.userapi.com/c851532/v851532508/15282d/vovZIefw-pU.jpg" alt="3" class="tape-img"></li>
                <li class="tape"><img src="https://pp.userapi.com/c851532/v851532508/152834/UuRT1wYIYRA.jpg" alt="4" class="tape-img"></li>
                <li class="tape"><img src="https://pp.userapi.com/c851532/v851532508/15283b/aPRqEZjQyBs.jpg" alt="5" class="tape-img"></li>
                <li class="tape"><img src="https://pp.userapi.com/c851532/v851532508/152842/wx6nV0vdCSY.jpg" alt="6" class="tape-img"></li>
                <li class="tape"><img src="https://pp.userapi.com/c851532/v851532508/152849/I6lkylgXSXM.jpg" alt="7" class="tape-img"></li>
            </ul>
       </div>
       <div id="win">
       </div>
    </div>
    <button onclick="start()" class="mainbutt">Крутить</button>
	<div class="state"></div>	
	<div class="blscreen">
		<div class="winblock">
			<button class="close">×</button>
			<h3>Ваш выйгрыш</h3>
			<div class="addimg">
				<img alt="wins">
	  	</div>
	  	<h4>Повышение звания</h4>
	  	<p>Стоимость: <span>2000р</span></p>
	  	<input type="name" placeholder="Ваш ник" class="wininp">
	  	    <button onclick="start()" class="winbutt">Крутить еще</button>
		</div>
	</div>

	</body>
</html>
              
            
!

CSS

              
                * {
    margin: 0;
    padding: 0;
    font-family:arial;
    outline:none;
    box-shadow:0 0 2px red inset;
}
body {
/*	background:url(img/backgr.jpg) no-repeat;
	background-size:cover;*/
	background:#232826;
	
}
button {
	cursor: pointer;
}
.tape-img {
  margin:0px;
  padding:0px;
	width:160px;
	height:150px;
	position:relative;
  }

.tape {
	position:relative;
	right:20px;
  height:150px;
  width:160px;
 /* margin:10px 0px;
*/}

li,ul {
	list-style:none;
	display:inline-block;
	content:"";
}
#main {
	width:640px;
	margin:100px auto 20px auto;
	overflow-x:hidden;
/*overflow-y:hidden;*/
	border:1px #00DF7E solid;
	box-shadow: 0 0 100px 1px rgba(0,220,100,0.3) ;
}
#mxwidth {		
	width:100%;
	margin:0 auto;
}
.tape:nth-child(3) {
	/*box-shadow:0px 0px 0 2px red ;*/
}
#win {
	position:absolute;
	border-left: 10px solid transparent; 
	border-right: 10px solid transparent;
	border-top: 10px solid #fefefe ;
	top:101px;
	left:49.5%;
}
#boxes {
	width:200%;
  height:150px;
}
.mainbutt {
		padding:15px 35px;
		color: #00DF7E ;
		background:rgba(0,0,0,0.5);
		font-weight:bold;
		letter-spacing:1px;
		border:none;
		border:1px #00DF7E solid;
		display:block;
		border-radius:30px;
		margin:0 auto;
		outline:none;
}
h1 {
	color:white;
}
.hdblock {
	float:left;
	color:#EDEDED;
	font-family:arial;
}
span {
	padding:5px 7px 3px 7px;
	border-radius:50%;
	color: #00DF7E ;
	font-size:10px;
	border:1px #00DF7E solid;
}
.opn {
	position:absolute;
	z-index:6;
	background: rgba(0,0,0,0.8);
	padding:10px;
	border:1px #dedede solid;
	display:none;
}
.opn img {
	
}
span:hover {
		background:#dedede;
}
.block {
	display:block;
}
.minprofile {
	 font-size:16px;
	color: #EDEDED;
	display:grid;
	grid-template-columns:25% 90%;
	position:relative;
	float:right;
}
.minprofile img {
	width:30px;
	border-radius:50%;
	margin-top:8px;
	border:1px #DEDEDE solid;
}
.minprofile p {
	font-weight:lighter;
}
.minprofile h4 { 
	 padding-bottom:8px;
	 text-transform:uppercase;
}
.minprofile div:before {
	content:"";
	display:block;
	width:130px;
	height:2px;
	background:radial-gradient(#00DF7E 2%,transparent 80%);
	position:relative;
	top:+24px;
}
.header {
	display:table;
	width:96%;
	margin:20px auto 0px auto;
}
.logo {
	width:400px;
	display:block;
	margin:0px auto 40px auto;
}
.state {
	color:blue;
	background:black;
	padding:20px 10px;
	position:absolute;
	bottom:0px;
	border-top:1px blue solid;
	
}
.blscreen {
	width:100%;
	height:100%;
	background:rgba(0,0,0,0.8);
	position:absolute;
	top:0px;
	display:none;
}
.winblock {
	margin:125px auto;
	width:300px;
	height:400px;
	background:#1C201F;
	display:block;
}
.winblock h3 {
	color:#fbfbfb;
	text-align:center;
	padding-bottom:5px;
}
.winblock img {
	margin:0 auto;
	display:block;
	border:1px #00DF7E solid;
	box-shadow: 0 0 80px 1px rgba(0,220,100,0.4);
  height:150px;
  width:170px;
}
.winblock span {
	border:none;
}
.winbutt {
	color:#fbfbfb;
	margin:0 auto;
	display:block;
	padding:10px 55px;
	font-size:18px;
	background:linear-gradient(90deg, #4AFFBE, #00DF7E );
	border:none;
	border-bottom:3px #00BA84 solid;
}
.winblock h4 {
	text-align:center;
	text-transform:uppercase;
	color:#00DF7E;
	font-weight:lighter;
	padding:10px 0px 10px 0px;
}
.winblock p {
	color:#606663;
	font-size:14px;
	margin-left:40px;
}
.winblock span {
	padding:0;
	font-size:12px;
}
.close {
	background:none;
	color:#606663;
	font-size:35px;
	border:none;
	height:40px;
	position: relative;
	left: 90%;
}
.wininp {
	background:#1E1B1B;
	padding:15px 20px;
	border:1px #00DF7E solid;
	margin:10px auto;
	display:block;
	color:#fbfbfb;
}
              
            
!

JS

              
                function start()	{

	  var boxed = 3; // начинаем считать кейсы
		var righ = 0;   // делаем анимацию увеличивая позицию в право
		var speed = Math.floor(Math.random() * (20 - 25 + 1)) + 25;  // Скорость прокрутки рулетки
		var delbox = 164; //Ширина кейса для удаления его
		var tim = setInterval(animated,12); 
    var imagess = ["<li class='tape'><img src='https://pp.userapi.com/c851532/v851532508/152849/I6lkylgXSXM.jpg' alt="+imgs+" class='tape-img'></li>"]; 
		 
		$("button").css("opacity","0.5");
		$(".mainbutt").removeAttr("onclick");

	 function animated() {
	    var imgs = Math.floor(Math.random() * (7 - 1 + 1)) + 1; //Случайная картинка
	    var child3 = $(".tape:nth-child(3) img"); // Подсвечиваем товар которыый по середине
	    var firS = $(".tape:first-child");
	    var cons = righ - delbox;	 //считаем на сколько блок зашел за границу
	
	 if (righ >= delbox) { 		//если блок за границей
	     firS.remove();			// удаляем его
	      $("#boxes").append(imagess);//И добавляем новый
	      	righ = cons + speed; 
		  $(".tape").css("right",righ + "px");
	     boxed++; // Считаем кол-во блоков		
	} else {
		if(speed <= 2) {
			speed -= 0.003;
		} else if (speed <= 6) {
			speed -= 0.007;
		} else {
 	  	    speed -= 0.02;
 	}
 	   righ += speed;
 		$(".tape").css("right",righ + "px");
 	}
 	if (speed <= 0) {
 	  clearInterval(tim);
 	 	$(".tape").animate({right: "95px"},2400);
		$(".addimg img").attr("src"	,"img/20181001_"+child3.attr("alt")+".png");
	  setTimeout(swi,2500);
 	}
		$(".state").html("бокс: "+boxed+"<br>Позиция: "+ righ+"<br>Скорость: "+speed+"<br> Отступ: "+cons); 					
		}
	}
function swi() {
	 	var nnu = $(".tape:nth-child(3) img").attr("alt");
	
		 $(".mainbutt").attr("onclick","start()");
	 	 $(".blscreen").toggle(400);
	 	 $("button").css("opacity","1");	
	 	
	 		switch(nnu) {
			case "1":
				$(".winblock h4").text("VIP'ка");
				$(".winblock span").text("300р");
			break;
			 case "2":
				$(".winblock h4").text("ADM + VIP");
				$(".winblock span").text("600р");
			break;
			 case "3":
				$(".winblock h4").text("Повышение звания");
				$(".winblock span").text("100р");
			break;
			 case "4":
				$(".winblock h4").text("Префикс");
				$(".winblock span").text("50р");
			break;
			 case "5":
				$(".winblock h4").text("Ник под пароль");
				$(".winblock span").text("75р");
			break;
			 case "6":
				$(".winblock h4").text("Смотритель");
				$(".winblock span").text("800р");
			break;
			 case "7":
				$(".winblock h4").text("Админка");
				$(".winblock span").text("400р");
			break;
		}
}
//делаем список что выпадает
$(function () {
	    $("span").click(function () {
	 		$(".opn").toggle(300);
	});
	$(".close,.winbutt").click(function () {
		$(".blscreen").toggle(400);
	})
 });


              
            
!
999px

Console