Jump to content


From mediawiki.org
This page is a translated version of the page Mobile Gateway/Mobile homepage formatting and the translation is 58% complete.

Main pages of MediaWiki instances which go beyond traditional text (for example using two column layouts) usually require special treatment to display on mobile via Extension:TemplateStyles in responsive skins such as Skin:Timeless and Skin:Minerva .



Hiding content on mobile



  • 它们受欢迎吗?
  • 它们正常更新吗?
  • 它们适合快速阅读吗?
  • 它们在移动屏幕上阅读舒适吗?


您必须具有管理权限且登录后才能进行以下操作。在首页的桌面版视图中,点击 "编辑" 并找到要在移动版中显示的元素。


<div class="nomobile"> ... </div>

在 div 的开标签和闭标签之间应放什么呢?大多数时候应是页面元素的模板,例如“每日图片”。

Using responsive styles

Certain styles are not mobile friendly. For example any css rules which make use of fixed pixel size e.g. width, height, padding. If different style treatment is needed please use Extension:TemplateStyles or port these styles to MediaWiki:Common.css or MediaWiki:Mobile.css. TemplateStyles is recommended but 3rd parties may wish to use the MobileFrontend feature flag $wgMFSiteStylesRenderBlocking.

For common problems with table based layouts, you can use the styles in the Minerva compatiblity template.

Some tips on common problems are addressed at Making MediaWiki Mobile Friendly .


Make sure to test all your changes!