【发布时间】:2012-02-26 07:23:09
【问题描述】:
我想要一个可缩放/灵活的全屏内联图像(无裁剪),它允许内容像任何其他网页一样位于其下方。这可能吗?我一直看到的是 position:fixed; 的解决方案。这对我来说是不可行的。
我一直在玩代码:http://css-tricks.com/perfect-full-page-background-image/,但修改它们以执行我想要的操作似乎不起作用。图像的缩放都是错误的,并且经常裁剪图像,这又不是我想要的。
这是一个粗略的想法的代码:
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<!-- full width and height image -->
<div id="feature-wrapper">
<img src="img/feature.jpg"/>
</div>
<!-- /end fullwidth/height image -->
<!-- lots of content that sits directly beneath big image -->
<img src="img/about-mug.jpg"/>
<img src="img/project1.jpg"/>
<p>Some more content beneath feature</p>
</body>
</html>
任何指针表示赞赏。欢迎使用 jQuery 解决方案 :)
【问题讨论】:
-
在 div 上以最低堆叠顺序使用背景图像不是一种选择吗?如果是,请查看 - buildinternet.com/project/supersized
标签: jquery css image fullscreen responsive-design