这是文章的第一段。
+这是文章的第二段。
+diff --git "a/\345\274\240\350\257\255\345\253\243/image/css\345\256\236\347\216\260\346\273\232\345\212\250\345\255\227\345\271\225.png" "b/\345\274\240\350\257\255\345\253\243/image/css\345\256\236\347\216\260\346\273\232\345\212\250\345\255\227\345\271\225.png" new file mode 100644 index 0000000000000000000000000000000000000000..e156007342188799a9fca217a760825349f27f92 Binary files /dev/null and "b/\345\274\240\350\257\255\345\253\243/image/css\345\256\236\347\216\260\346\273\232\345\212\250\345\255\227\345\271\225.png" differ diff --git "a/\345\274\240\350\257\255\345\253\243/image/\346\213\226\346\213\275.png" "b/\345\274\240\350\257\255\345\253\243/image/\346\213\226\346\213\275.png" new file mode 100644 index 0000000000000000000000000000000000000000..4651f95b3b2bb1df7bf1a3109f0cf67c07da224d Binary files /dev/null and "b/\345\274\240\350\257\255\345\253\243/image/\346\213\226\346\213\275.png" differ diff --git "a/\345\274\240\350\257\255\345\253\243/image/\346\226\207\346\234\254\345\257\271\351\275\220\345\222\214\350\243\205\351\245\260.png" "b/\345\274\240\350\257\255\345\253\243/image/\346\226\207\346\234\254\345\257\271\351\275\220\345\222\214\350\243\205\351\245\260.png" new file mode 100644 index 0000000000000000000000000000000000000000..ca94c592d597f48badc53479dfccb07572cacb96 Binary files /dev/null and "b/\345\274\240\350\257\255\345\253\243/image/\346\226\207\346\234\254\345\257\271\351\275\220\345\222\214\350\243\205\351\245\260.png" differ diff --git "a/\345\274\240\350\257\255\345\253\243/image/\346\226\207\346\234\254\346\216\222\347\211\210\350\256\276\350\256\241.png" "b/\345\274\240\350\257\255\345\253\243/image/\346\226\207\346\234\254\346\216\222\347\211\210\350\256\276\350\256\241.png" new file mode 100644 index 0000000000000000000000000000000000000000..be619224513e4eff565a8b2992e07558264a7ff4 Binary files /dev/null and "b/\345\274\240\350\257\255\345\253\243/image/\346\226\207\346\234\254\346\216\222\347\211\210\350\256\276\350\256\241.png" differ diff --git "a/\345\274\240\350\257\255\345\253\243/image/\346\226\207\346\234\254\346\240\267\345\274\217\344\270\216\344\274\252\347\261\273\347\273\223\345\220\210.png" "b/\345\274\240\350\257\255\345\253\243/image/\346\226\207\346\234\254\346\240\267\345\274\217\344\270\216\344\274\252\347\261\273\347\273\223\345\220\210.png" new file mode 100644 index 0000000000000000000000000000000000000000..a5404964ad50198c3e4a93f5be719c5aadbf8e26 Binary files /dev/null and "b/\345\274\240\350\257\255\345\253\243/image/\346\226\207\346\234\254\346\240\267\345\274\217\344\270\216\344\274\252\347\261\273\347\273\223\345\220\210.png" differ diff --git "a/\345\274\240\350\257\255\345\253\243/image/\346\226\207\346\234\254\346\240\267\345\274\217\344\270\216\345\212\250\347\224\273.png" "b/\345\274\240\350\257\255\345\253\243/image/\346\226\207\346\234\254\346\240\267\345\274\217\344\270\216\345\212\250\347\224\273.png" new file mode 100644 index 0000000000000000000000000000000000000000..207cf68135716ef60ebed6773a152588026c9d2e Binary files /dev/null and "b/\345\274\240\350\257\255\345\253\243/image/\346\226\207\346\234\254\346\240\267\345\274\217\344\270\216\345\212\250\347\224\273.png" differ diff --git "a/\345\274\240\350\257\255\345\253\243/image/\346\226\207\346\234\254\346\240\267\345\274\217\345\223\215\345\272\224\345\274\217\350\256\276\350\256\241.png" "b/\345\274\240\350\257\255\345\253\243/image/\346\226\207\346\234\254\346\240\267\345\274\217\345\223\215\345\272\224\345\274\217\350\256\276\350\256\241.png" new file mode 100644 index 0000000000000000000000000000000000000000..6fd1ed065a16280096e7ac12100f60d4e2a4db1c Binary files /dev/null and "b/\345\274\240\350\257\255\345\253\243/image/\346\226\207\346\234\254\346\240\267\345\274\217\345\223\215\345\272\224\345\274\217\350\256\276\350\256\241.png" differ diff --git "a/\345\274\240\350\257\255\345\253\243/image/\346\226\207\346\234\254\346\240\267\345\274\217\347\273\274\345\220\210\350\256\276\350\256\241.png" "b/\345\274\240\350\257\255\345\253\243/image/\346\226\207\346\234\254\346\240\267\345\274\217\347\273\274\345\220\210\350\256\276\350\256\241.png" new file mode 100644 index 0000000000000000000000000000000000000000..64c5344d1a8facb237be4594ef0a53d270c9a6f1 Binary files /dev/null and "b/\345\274\240\350\257\255\345\253\243/image/\346\226\207\346\234\254\346\240\267\345\274\217\347\273\274\345\220\210\350\256\276\350\256\241.png" differ diff --git "a/\345\274\240\350\257\255\345\253\243/\350\257\276\345\220\216\344\275\234\344\270\232/20240923/test01-css\345\256\236\347\216\260\346\273\232\345\212\250\345\255\227\345\271\225.html" "b/\345\274\240\350\257\255\345\253\243/\350\257\276\345\220\216\344\275\234\344\270\232/20240923/test01-css\345\256\236\347\216\260\346\273\232\345\212\250\345\255\227\345\271\225.html" new file mode 100644 index 0000000000000000000000000000000000000000..c7d981ca5600c2ec502f16e3a41c580d5e6cba1c --- /dev/null +++ "b/\345\274\240\350\257\255\345\253\243/\350\257\276\345\220\216\344\275\234\344\270\232/20240923/test01-css\345\256\236\347\216\260\346\273\232\345\212\250\345\255\227\345\271\225.html" @@ -0,0 +1,41 @@ + + + +
+ + +这是一段需要高亮显示的文本。
+ + + \ No newline at end of file diff --git "a/\345\274\240\350\257\255\345\253\243/\350\257\276\345\220\216\344\275\234\344\270\232/20240926/test02-\346\226\207\346\234\254\346\216\222\347\211\210\350\256\276\350\256\241.html" "b/\345\274\240\350\257\255\345\253\243/\350\257\276\345\220\216\344\275\234\344\270\232/20240926/test02-\346\226\207\346\234\254\346\216\222\347\211\210\350\256\276\350\256\241.html" new file mode 100644 index 0000000000000000000000000000000000000000..f1e875bda73f049473bb46b30bb3fe972644af63 --- /dev/null +++ "b/\345\274\240\350\257\255\345\253\243/\350\257\276\345\220\216\344\275\234\344\270\232/20240926/test02-\346\226\207\346\234\254\346\216\222\347\211\210\350\256\276\350\256\241.html" @@ -0,0 +1,30 @@ + + + + + + +这是文章的第一段。
+这是文章的第二段。
++ 这是一个引用文本。它应该看起来像是从某本书中摘录的。 ++ + + \ No newline at end of file diff --git "a/\345\274\240\350\257\255\345\253\243/\350\257\276\345\220\216\344\275\234\344\270\232/20240926/test06-\346\226\207\346\234\254\346\240\267\345\274\217\344\270\216\345\212\250\347\224\273.html" "b/\345\274\240\350\257\255\345\253\243/\350\257\276\345\220\216\344\275\234\344\270\232/20240926/test06-\346\226\207\346\234\254\346\240\267\345\274\217\344\270\216\345\212\250\347\224\273.html" new file mode 100644 index 0000000000000000000000000000000000000000..4455cca9674a799c30ef33385d106fe872955f8c --- /dev/null +++ "b/\345\274\240\350\257\255\345\253\243/\350\257\276\345\220\216\344\275\234\344\270\232/20240926/test06-\346\226\207\346\234\254\346\240\267\345\274\217\344\270\216\345\212\250\347\224\273.html" @@ -0,0 +1,28 @@ + + + + + + +
这段文本将闪烁。
+ + + \ No newline at end of file diff --git "a/\345\274\240\350\257\255\345\253\243/\350\257\276\345\240\202\347\254\224\350\256\260/20240923-\346\213\226\346\213\275+\345\216\206\345\217\262+\345\234\260\347\220\206+\345\205\250\345\261\217.md" "b/\345\274\240\350\257\255\345\253\243/\350\257\276\345\240\202\347\254\224\350\256\260/20240923-\346\213\226\346\213\275+\345\216\206\345\217\262+\345\234\260\347\220\206+\345\205\250\345\261\217.md" new file mode 100644 index 0000000000000000000000000000000000000000..ed5dfe3162f710c427da63ba3a586e10587392e4 --- /dev/null +++ "b/\345\274\240\350\257\255\345\253\243/\350\257\276\345\240\202\347\254\224\350\256\260/20240923-\346\213\226\346\213\275+\345\216\206\345\217\262+\345\234\260\347\220\206+\345\205\250\345\261\217.md" @@ -0,0 +1,266 @@ +## 拖拽 +### 1、拖拽元素 +```html + +``` +**拖拽元素的事件监听**:(应用于拖拽元素) + +- `ondragstart`当拖拽开始时调用 + +- `ondragleave` 当**鼠标离开拖拽元素时**调用 + +- `ondragend` 当拖拽结束时调用 + +- `ondrag` 整个拖拽过程都会调用 +```html + +``` + +### 2、目标元素 + +把A拖到B去,那B就是目标元素。页面中任何一个元素都可以成为目标元素。 + +**目标元素的事件监听**:(应用于目标元素) + +- `ondragenter` 当拖拽元素进入时调用 + +- `ondragover` 当拖拽元素停留在目标元素上时,就会连续一直触发(不管拖拽元素此时是移动还是不动的状态) + +- `ondrop` 当在目标元素上松开鼠标时调用 + +- `ondragleave` 当鼠标离开目标元素时调用 + +```html + + + + + + +``` + +## 历史 + +界面上的所有JS操作不会被浏览器记住,就无法回到之前的状态。 + +在HTML5中可以通过 `window.history` 操作访问历史状态,让一个页面可以有多个历史状态 + +`window.history`对象可以让我们管理历史记录,可用于单页面应用,Single Page Application,可以无刷新改变网页内容。 + +- window.history.forward(); // 前进 + +- window.history.back(); // 后退 + +- window.history.go(); // 刷新 + +- window.history.go(n); //n=1 表示前进;n=-1 后退;n=0s 刷新。如果移动的位置超出了访问历史的边界,会静默失败,但不会报错。 + +- 通过JS可以加入一个访问状态 + +- history.pushState; //放入历史中的状态数据, 设置title(现在浏览器不支持改变历史状态) + +### API详解 + +- navigator.getCurrentPosition(successCallback, errorCallback, options) 获取当前地理信息 + +- navigator.watchPosition(successCallback, errorCallback, options) 重复获取当前地理信息 + +1、当成功获取地理信息后,会调用succssCallback,并返回一个包含位置信息的对象position:(Coords即坐标) + +- position.coords.latitude纬度 + +- position.coords.longitude经度 + +2、当获取地理信息失败后,会调用errorCallback,并返回错误信息error。 + +3、可选参数 options 对象可以调整位置信息数据收集方式 + +### 开启/关闭全屏显示 + +方法如下:(注意 screen 是小写) + +```javascript + requestFullscreen() //让元素开启全屏显示 + + cancleFullscreen() //让元素关闭全屏显示 +``` + + +为考虑兼容性问题,不同的浏览器需要**在此基础之上**,添加私有前缀,比如:(注意 screen 是大写) + +```javascript + webkitRequestFullScreen + webkitCancleFullScreen + + mozRequestFullScreen + mozCancleFullScreen +``` + +### 检测当前是否处于全屏状态 + +方法如下: + +``` + document.fullScreen +``` + + +不同浏览器需要加私有前缀,比如: + +```javascript + document.webkitIsFullScreen + + document.mozFullScreen +``` + + +### 全屏的伪类 + +- :full-screen .box {} + +- :-webkit-full-screen {} + +- :moz-full-screen {} + +比如说,当元素处于全屏状态时,改变它的样式。这时就可以用到伪类。 + +### H5 中有两种存储的方式 + +1、**`window.sessionStorage` 会话存储:** + +- 保存在内存中。 + +- **生命周期**为关闭浏览器窗口。也就是说,当窗口关闭时数据销毁。 + +- 在同一个窗口下数据可以共享。 + + +2、**`window.localStorage` 本地存储**: + +- 有可能保存在浏览器内存里,有可能在硬盘里。 + +- 永久生效,除非手动删除(比如清理垃圾的时候)。 + +- 可以多窗口共享。 + +# 作业效果图 + +```html + + + +这是文章的第一段。
+这是文章的第二段。
++ 这是一个引用文本。它应该看起来像是从某本书中摘录的。 ++ +``` + +```html + + +
这段文本将闪烁。
+``` \ No newline at end of file