上一页 1 2 3 4 5 6 7 8 9 10 ··· 19 下一页
摘要: <!DOCTYPE html><html> <head> <meta charset="utf-8"> <title>const定义常量</title> </head> <body> <script> // 声明常量 const STR = '小王'; console.log(STR); // 1. 阅读全文
posted @ 2020-08-04 11:42 Smile*^ 阅读(450) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html><html> <head> <meta charset="utf-8"> <title>let的经典案例</title> <style> .item{ border: 1px solid aquamarine; width: 100px; height: 100px; 阅读全文
posted @ 2020-08-03 19:15 Smile*^ 阅读(140) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html><html> <head> <meta charset="utf-8"> <title></title> </head> <body> <script> // 变量声明 let a; let b,c,d; let e = 100; let f = 521, g = 'h 阅读全文
posted @ 2020-08-03 19:14 Smile*^ 阅读(114) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html><html> <head> <meta charset="utf-8" /> <title></title> <link rel="stylesheet" href="css/new_file.css" /> </head> <body> <div class="con 阅读全文
posted @ 2020-08-01 16:34 Smile*^ 阅读(1453) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>3D Te 阅读全文
posted @ 2020-07-31 22:12 Smile*^ 阅读(2067) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html><html> <head> <meta charset="UTF-8"> <title></title> <style> .container{ /*弹性盒子容器 相当于float 使元素排成一行*/ display: flex; /*使元素排成一行 并且右对齐*/ / 阅读全文
posted @ 2020-07-30 13:52 Smile*^ 阅读(102) 评论(0) 推荐(0) 编辑
摘要: /*最外层的盒子*/.container{ width: 640px; height: 640px; /*盒子居中*/ margin: 100px auto; /*相对定位*/ position: relative;}/*两个按钮*/.btn{ width: 100%; height: 100%; 阅读全文
posted @ 2020-07-29 20:03 Smile*^ 阅读(216) 评论(0) 推荐(0) 编辑
摘要: //面向对象开发//创建方格var sw=20, //小方格的宽 sh=20, //小方格的高 tr=30, //行数 td=30; //列数//蛇的实例 var snake = null,//食物的实例 food=null,//游戏的实例 game=null;// 构造函数// x 横坐标 y 纵 阅读全文
posted @ 2020-07-29 20:01 Smile*^ 阅读(281) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title>贪吃蛇</title> <link rel="stylesheet" href="css/index.css" /> </head> <body> <div class="co 阅读全文
posted @ 2020-07-29 20:00 Smile*^ 阅读(131) 评论(0) 推荐(0) 编辑
摘要: JavaScript创建对象的方式有很多,通过Object构造函数或对象字面量的方式也可以创建单个对象,显然这两种方式会产生大量的重复代码,并不适合量产。 接下来介绍七种非常经典的创建对象的方法 一、工厂模式 function createPerson(name, job) { var o = ne 阅读全文
posted @ 2020-07-28 21:38 Smile*^ 阅读(792) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 10 ··· 19 下一页