Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/75.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 自动居中列表项/图像100%页面高度_Javascript_Jquery_Css_Responsive Design_Image Gallery - Fatal编程技术网

Javascript 自动居中列表项/图像100%页面高度

Javascript 自动居中列表项/图像100%页面高度,javascript,jquery,css,responsive-design,image-gallery,Javascript,Jquery,Css,Responsive Design,Image Gallery,基本上,我试图实现的是以下布局 我尝试过使用表格,但无法将图像设置为100%的页面高度。 我曾经尝试过用display:inline框住一个无序的列表,并正确调整了图像的大小,但我无法“集中”在列表中的“主”或第二项上 我受到一个事实的限制,即我不能指定图像的尺寸。 我希望尽可能地坚持使用CSS,除非有一种方法可以用Jquery测试窗口大小,并以某种方式输入它?(我对这个很陌生) 我没有主意了,有人能帮我吗 干杯 这是我得到的最接近的结果 <body> <div class=

基本上,我试图实现的是以下布局

我尝试过使用表格,但无法将图像设置为100%的页面高度。
我曾经尝试过用display:inline框住一个无序的列表,并正确调整了图像的大小,但我无法“集中”在列表中的“主”或第二项上

我受到一个事实的限制,即我不能指定图像的尺寸。 我希望尽可能地坚持使用CSS,除非有一种方法可以用Jquery测试窗口大小,并以某种方式输入它?(我对这个很陌生)

我没有主意了,有人能帮我吗

干杯

这是我得到的最接近的结果

<body>
<div class="wrapper" style="position:absolute; width:100%; height:100%; margin:0; padding:0; top:0; left:0;">

    <table style="position:absolute; width:100%; height:100%; margin:0; padding:0; top:0; left:0; text-align:center;    white-space: nowrap;    overflow:hidden;">

            <td style="width:20%" ><img style="position:relative;width:auto;max-height:100%" src="http://shellsuitzombie.co.uk/wp-content/uploads/2013/04/Brad-Rose-I-never-finish-anything.jpg"></td>
            <td style="width:60%" ><img style="position:relative;width:auto;max-height:100%" src="http://shellsuitzombie.co.uk/wp-content/uploads/2013/04/Brad-Rose-I-never-finish-anything.jpg"></td>
            <td style="width:20%" ><img style="position:relative;width:auto;max-height:100%" src="http://shellsuitzombie.co.uk/wp-content/uploads/2013/04/Brad-Rose-I-never-finish-anything.jpg"></td>


</tr></table></div></body>

问题应该出在您的表格安排上
请检查一下表格和上传文件的位置。weather是否调用jQuery?你的jQuery函数是否被调用,并将图像宽度和高度设置为100%,如果你给我你的站点链接,我会为你做。

你想将图像大小设置为视图的100%,还是将div设置为该大小?比如???@Ashley:你能添加代码或使用@SpYk3HH之类的,我只需要添加图像,使其最大高度:100%;宽度:自动