动画响应背景图像网格

时间:2018-04-20 12:54:53

标签: grid background-image responsive-images

我想让THIS GRID垂直响应。

水平响应,占据全宽。但如果页面很长,图像网格不会占据全高。

有什么建议吗? 请参阅随附的当前结果的屏幕截图。Screenshot

1 个答案:

答案 0 :(得分:0)

您需要通过JavaScript完成此操作并调整元素大小以覆盖窗口高度,因此请使用此函数检索高度并动态设置为div高度:

package com.java.inheritance; import java.util.List; public class MainClass { public static void main(String[] args) { try{ List<Student> sciencestudents=null; List<Student> artstudnets=null; Student s1= new Student("Asfakul",1,"Science"); Student s2=new Student("Arizul",2,"Science"); Student s3=new Student("Noor",3,"Arts"); sciencestudents.add(s1); sciencestudents.add(s2); artstudnets.add(s3); Department d1=new Department("Science",sciencestudents); Department d2=new Department("Arts",artstudnets); List<Department> departmentlist=null; departmentlist.add(d1); departmentlist.add(d2); Institute i1= new Institute("BEC",departmentlist); System.out.println(i1.gettotalnoofStudents()); }catch(Exception e){ e.printStackTrace(); } } }

如果您需要更多信息

$(window).height();   // returns height of browser viewport