From 7aba14fb7c970c6e6af82c805db2aef6d70bfe2b Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Sat, 14 Oct 2023 15:38:42 +0800 Subject: recompiled & originzied directories --- dest/js/index.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 dest/js/index.js (limited to 'dest/js/index.js') 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 -- cgit v1.2.3