js 定义二维数组并初始化

最近一朋友搞安卓的,需要做个电影院选作位的 VIEW 原生安卓找不到对应的实现方法,只好求助于我用前端html5+js实现。搞了半夜,附上劳动成果。给需要用js二维数组和二维数组初始化的童鞋当demo用




	
		
		
		电影院选座位

		
		
		
		
	

	

		

样式文件:

body {
	height: 100%;
	width: 100%;
	background-image: url(../images/1.png);
	background-size: cover;
}

.wrapper {
	position: relative;
	/*	margin: 60px 0 0 40px;*/
	margin: 0 auto;
	max-width: 640px;
}

.ract {
	width: 18px;
	height: 18px;
	border-radius: 100%;
	border: 1px solid red;
	background: red;
	position: absolute;
}

.dialog {
	width: 33px;
	height: 20px;
	left: 29px;
	top: 0px;
	position: absolute;
	background: #F0AD4E;
	color: #fff;
	line-height: 20px;
	text-align: center;
	font-size: 12px;
}

.dialog span:before {
	position: absolute;
	left: -24px;
	top: 2px;
	content: '';
	border-top: 8px solid transparent;
	border-bottom: 8px solid transparent;
	border-left: 12px solid transparent;
	border-right: 12px solid #F0AD4E;
}

.u-tri:before {
	position: absolute;
	left: -24px;
	top: 4px;
	content: '';
	border-top: 8px solid transparent;
	border-bottom: 8px solid transparent;
	border-left: 12px solid transparent;
	border-right: 12px solid green;
}

 运行效果图:

js 定义二维数组并初始化_第1张图片

 

你可能感兴趣的:(jquery)