上一页 1 ··· 8 9 10 11 12 13 14 15 16 下一页
摘要: 代码: 用处:可用于集合对象的遍历。 阅读全文
posted @ 2016-08-18 11:22 晨落梦公子 阅读(15712) 评论(0) 推荐(2) 编辑
摘要: 先贴代码: 1 /** 2 * Created by Administrator on 2016/8/17. 3 */ 4 (function () { 5 6 function createStudent(name,age,gender) { 7 var student={name:name,ag 阅读全文
posted @ 2016-08-17 19:38 晨落梦公子 阅读(153) 评论(0) 推荐(0) 编辑
摘要: 我用的是webstorm,当写css 样式时候,会没有提示,可以按Ctrl+Alt+Space。 阅读全文
posted @ 2016-08-17 19:19 晨落梦公子 阅读(460) 评论(0) 推荐(0) 编辑
摘要: 先看下我开始写的代码吧: 1 <!DOCTYPE html> 2 <html lang="en"> 3 <head> 4 <meta charset="UTF-8"> 5 <title>切换红绿蓝</title> 6 <style> 7 #div{ 8 width: 100px; 9 height: 阅读全文
posted @ 2016-08-16 19:35 晨落梦公子 阅读(182) 评论(0) 推荐(0) 编辑
摘要: 代码: 注意两个点: ①:开始拖拽的时候,应判断好拖拽点的位置。 ②:不拖拽的时候能够“放下”。 这也挺实用的,如著名的飞机大战。 补充:2016-10-1108:35:16 代码解释 如图,rectX,rectY指的是鼠标的位置,如果不设置offset,鼠标每次的位置会在rect处,这样的效果很不 阅读全文
posted @ 2016-08-16 19:30 晨落梦公子 阅读(593) 评论(0) 推荐(0) 编辑
摘要: 代码: 挺实用的一个小例子。好的,又一块砖放好了O(∩_∩)O 今天看着代码有了新的理解(by 16.08.22) 主要是解释一下p。 阅读全文
posted @ 2016-08-16 19:24 晨落梦公子 阅读(189) 评论(0) 推荐(0) 编辑
摘要: 先贴代码: 1 <!DOCTYPE html> 2 <html> 3 <head lang="en"> 4 <meta charset="UTF-8"> 5 <title></title> 6 <script type="text/javascript"> 7 window.onload = fun 阅读全文
posted @ 2016-08-16 19:17 晨落梦公子 阅读(23268) 评论(0) 推荐(0) 编辑
摘要: 大图居中: 先看一下普通的居中: 代码为: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> <style> .img{ display: block; margin: auto; 阅读全文
posted @ 2016-08-16 18:55 晨落梦公子 阅读(161) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> <link href="style.css" rel="stylesheet"> </head> <body> <div> <div 阅读全文
posted @ 2016-08-16 14:54 晨落梦公子 阅读(463) 评论(0) 推荐(0) 编辑
摘要: 效果图: 代码: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>三角形</title> <style> #tri{ width: 0; height: 0; border-top: 0 solid tran 阅读全文
posted @ 2016-08-13 19:46 晨落梦公子 阅读(277) 评论(0) 推荐(0) 编辑
上一页 1 ··· 8 9 10 11 12 13 14 15 16 下一页