.child { width:100%; height:500px; } .child:first-child { background:red; } .child:nth-child(2) { background:green; } .child:nth-child(3) { background:black; } .child:nth-child(4) { background:purple; } .child:last-child { background:blue; } .bg-progress { width:100%; position:fixed; height:5px; top:0; } .progressBar { width:0; height:100%; background:yellow; } .footer { height:800px; }
简单的进度条demo