Using Javascript with Drupal
Using Javascript with Drupal
我有一个网站,http://raptorshop.com
目前,我已经将CSS设置为最小高度为700px,但是我希望每个页面都自动注意浏览器的大小,并相应地调整大小(这样页脚就有大约50-200px,这取决于浏览器的大小,但仅此而已)。目前,如果你在一个小显示器上浏览这个网站,它会显示一个滚动,这是我不想要的。
在Drupal中有办法做到这一点吗?我知道如何为单个页面做这件事,但我希望每个页面都做这种自动检查/调整大小
您可以很容易地使用jquery检查窗口高度,然后根据需要更改css。
一个例子:
$(document).ready(function(){
if ($(window).height() < 700)
{
// this window is smaller than 700px
}
else
{
// this window is bigger than 700px
}
});
您必须编辑一些模板文件,例如站点页眉和页脚的模板文件。在这些情况下,听起来你真正想要实现的是一个CSS粘页脚。
你可以在这里找到一个:http://www.cssstickyfooter.com/
相关文章:
- Fighting with FRP
- issue with FB.Event.subscribe
- geolocation-marker.js conflict with markerclusterer.js
- Angular 2.0 with JavaScript or TypeScript?
- 为什么不推荐使用“with”?是否有更好或其他方法可以“下降”到对象的命名空间
- WebComponentsJS with IE10
- 指令的模板必须只有一个根元素:With restrict E&替换true
- timeago.js with datatable and PHP
- Ajax and Json with Rails
- errors with Javascript try catch
- how to split a string with ','
- Understanding Javascript scope with "var that = this&qu
- Architecture for CPU intensive tasks with NodeJS & Socke
- How to declare a Map containing certain properties with flow
- 设置'这'在React with Inverse Data Flow中
- Unit-testing multiple use cases with Karma & Mocha.js
- Modify Javascript with C#
- 谷歌地图API v3:Initial View is Fine,but Gray Box with No Map if
- Using Javascript with Drupal
- Drupal problems with noConflict JQuery