Dassault Systèmes interview question

How to devide Screen into n,n-1,n-2.....1 horizontal blocks with javascript and css.