summaryrefslogtreecommitdiff
path: root/dest/js/index.js
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2023-10-14 15:38:42 +0800
committerlittleblack111 <littleblack11111@gmail.com>2023-10-14 15:38:42 +0800
commit7aba14fb7c970c6e6af82c805db2aef6d70bfe2b (patch)
tree43a78d4a237358a83acf657d9b8e570830922fdb /dest/js/index.js
parentc1020bf05b03d987fd300198723e5a40936a2b20 (diff)
recompiled & originzied directories
Diffstat (limited to 'dest/js/index.js')
-rw-r--r--dest/js/index.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/dest/js/index.js b/dest/js/index.js
new file mode 100644
index 00000000..bb886053
--- /dev/null
+++ b/dest/js/index.js
@@ -0,0 +1,13 @@
+"use strict";
+
+var obj = document.getElementById('infos');
+var topBar = document.getElementById('navBarHeader');
+window.addEventListener('scroll', function () {
+ var value = window.scrollY;
+ obj.style.marginTop = value * 2.5 + 'px';
+ console.log("==============");
+ console.log(topBar.style.height);
+ console.log(value);
+}, {
+ passive: true
+}); \ No newline at end of file