Line 38: | Line 38: | ||
</style> | </style> | ||
− | + | <script> | |
+ | function centers(){ | ||
+ | var divs = document.getElementById("aa"); | ||
+ | document.getElementById("aa").style.marginLeft = (screen.width -divs.offsetWidth)/2+"px"; | ||
+ | } | ||
+ | </script> | ||
<body> | <body> | ||
+ | <div id="aa" style="position:absolute;width:100;height:100;z-index:-1;"> | ||
<canvas id="Mycanvas" style="position:absolute;top:0px;left:0px;z-index:1;"></canvas> | <canvas id="Mycanvas" style="position:absolute;top:0px;left:0px;z-index:1;"></canvas> | ||
+ | </div> | ||
<script> | <script> | ||
//定义画布宽高和生成点的个数 | //定义画布宽高和生成点的个数 |
Revision as of 13:51, 6 October 2016
Team CIEI_BJ