仅适用于移动设备的Joomla 3隐藏模块 [英] Joomla 3 hide module just for mobile devices
问题描述
我在Joomla 3的新网站上使用可移动的主题.有人可以告诉我,我如何为移动设备(iPhone等)的访客隐藏几个模块?我在两个模块中都有一个长长的横幅,如果使用计算机浏览器访问该网站,看起来会很好.但是,如果有人使用移动设备访问我的网站,该如何隐藏该模块?时间太长,无法欣赏到美景...
I working on my new site in Joomla 3 with mobile ready theme. Can somebody tell me please, how I can hide few modules for mobile device (iPhone, etc...) visitors? I have a long banners in two modules, what is looks nice if visiting that site with computer browser. But how I can hide this modules if somebody visiting my site with mobile device? Is too long and broke a nice view...
推荐答案
在新版本的引导程序中,有一个用于隐藏模块的新CSS名称,请在
In the new version of bootstrap there is a new css names for hidding modules, check it on http://getbootstrap.com/css/
例如: "hidden-xs"代表旧的"hidden-phone"
For example: "hidden-xs" stands for the old "hidden-phone"
但是如果您仍然有问题,并且隐藏电话"或"hidden-xs"都无法使用.您可以自己添加此类:
But if you still have a truble and "hidden-phone" nor "hidden-xs" works. You can add this class by yourself:
将此代码添加到您的一个CSS文件(您的style.css或custom.css)中:
Add this code to one of your Css files (your style.css or your custom.css):
@media (max-width : 768px) {
.hidden-phone {
display: none;
}
}
然后按照上面的建议,将模块类后缀添加到所需的模块中.
Then follow the advise above and add module class suffix to desired module.
编辑模块时,转到选项->高级选项,然后查看 在框中添加模块类后缀".添加隐藏电话"
When editing the module, go to Options -> Advanced Options and look for a box to add a "Module Class Suffix". Add " hidden-phone"
这篇关于仅适用于移动设备的Joomla 3隐藏模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!