如何从超大全屏幻灯片中获取100px? [英] How to take 100px from a Supersized fullscreen slideshow?

查看:117
本文介绍了如何从超大全屏幻灯片中获取100px?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

超大幻灯片会拉伸幻灯片图像以填满整个屏幕.但是,我想在幻灯片放映前设置一个100px的标题(而不是在其上方).我该怎么办?

A Supersized slideshow stretches slideshow images to fill the screen. Yet I would like to have a 100px header before the slideshow (not over it). How can I do?

常见问题解答说明幻灯片不必全屏显示,但是我仍然希望它是全屏的,期望从顶部开始100px.

The FAQ explains that the slideshow needs not to be fullscreen, yet I still want it to be fullscreen, expect for 100px from the top.

推荐答案

自您提出要求以来,我知道已经有些过时了,但是我使用它来缩小Supersized占用的空间.

I know it's been a bit since you've asked, but I've used this to shrink the space that Supersized takes up.

function portfolioSize () {
    $('#supersized').height( $(window).height() - 71 );
}
$(window).load(function() { portfolioSize(); });
$(window).resize(function() { portfolioSize(); });

这将拉动窗口高度并减去必要的像素数量.以下两行用于确保在初始加载时以及在调整浏览器窗口大小时应用此功能.

This pulls the window height and subtracts the necessary amount of pixels. The two lines below serve to ensure the function is applied on initial load and when the browser window is resized.

作为旁注,我认为可能还需要以下CSS(自从我在需要此的网站上工作以来,这有点过头,因此出于其他原因,它们可能也存在于此):

As a side note, I believe the following CSS may be required as well (It's been a bit since I've worked on the site that needed this, so these could be there for other reasons):

#supersized {position: relative !important;}

#supersized li {position: absolute !important; height: 100% !important;}

这篇关于如何从超大全屏幻灯片中获取100px?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆