bye bye github
This commit is contained in:
12
public/home/pang/d3Tras.js
vendored
Executable file
12
public/home/pang/d3Tras.js
vendored
Executable file
@@ -0,0 +1,12 @@
|
||||
|
||||
var h = d3.select('section#trs').node().getBoundingClientRect().top;
|
||||
|
||||
d3.select(window).on("scroll",function(){
|
||||
var t = d3.select('#trs').node().getBoundingClientRect().top;
|
||||
var trans= Math.min(Math.round(100*(h-t)/h)/100,0.98);
|
||||
d3.selectAll('.trans').style("background-color","rgba(51,51,51,"+ trans +")");
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user