HTML/CSS : IMG with height equal to the height of document (not the window)

标签 html css window height document

我怎样才能达到这种效果?

最佳答案

对于完整的水平和垂直尝试类似的东西:

background-image: url(image.jpg);
background-repeat:no-repeat;
background-position:center center;
background-attachment:fixed;
-o-background-size: 100% 100%, auto;
-moz-background-size: 100% 100%, auto;
-webkit-background-size: 100% 100%, auto;
background-size: 100% 100%, auto;

或者更好地在 http://jsfiddle.net/ 中发布您的代码

关于HTML/CSS : IMG with height equal to the height of document (not the window),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4664314/

相关文章:

javascript - Jquery 不添加新的引导表

html - 如何为位置 : absolute 制作响应式 div

python - 如果笔记本电脑屏幕关闭,通过 printwindow 获取屏幕截图不会重绘

javascript - window.open 触发 print onLoad 时父窗口卡住

javascript - 试图让我的社交链接在悬停时保持静止

jquery - 使用 CSS 样式修复 jQuery 对话框中的空白

html - 禁止在 iframe 中滚动

css - 如何将 SVG 背景图像放到容器底部?

python - 如何在启动对话框时使父窗口不可见

html - html中右 block 先写后左