<!--****************************************************************************************************
* 作者:鲲鹏击浪
* 学院:http://edu.51cto.com/lecturer/index/user_id-8897792.html
* 博客园:http://www.cnblogs.com/xietong/
* 微博:http://weibo.com/u/3203486241?source=blog&is_all=1
* 博客:http://blog.sina.com.cn/51jilang
* *************欢迎学习我的课程,关注我的博客等**************************************************************
* ***********************************************************************************************************-->
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
</head>
<body>
<canvas id="myCanvas" style="border:2px solid red;width:400px;height:500px;"></canvas>
<div style="float:left"><p>游戏规则:如果第一次抛出骰子的和是7或者11,则获胜,如果是2、3或12则失败,游戏结束。否则记下第一次抛的点数继续抛,如果抛的数为7则失败,如果抛出的点数与第一次相同则获胜,否则继续。</p></div>
<br />
<Button title="掷骰子" id="throw">掷骰子</Button>
<br /> <br /> <br />
<script src="Scripts/dice.js"></script>
<script type="text/javascript">
!function () {
var curDice= new dice({ id: "myCanvas", targetId: "throw", diceHeight: 50, diceWidth: 50, radius: 6, px: 30, py: 30,px1:120,py1:30 });
}();
</script>
</body>
</html>
html5掷骰子小游戏
需积分: 45 21 浏览量
2016-06-10
18:11:54
上传
评论 4
收藏 2KB 7Z 举报
kunpengjilang
- 粉丝: 8
- 资源: 25