FANDOM



模板說明文件 (有時,上方的模板不可見) [檢視] [編輯] [頁面歷史] [重新整理]
Description

This template is a slider used on the main page.

Dependencies

This template uses {{Slider generator}} and the following resources:

Slide Template Preview image Background image
0 {{Slider/Slide 0}} None None
1 {{Slider/Slide 1}} File:Slide 1 preview.jpg File:Slide 1 background.jpg
2 {{Slider/Slide 2}} File:Slide 2 preview.jpg File:Slide 2 background.jpg
3 {{Slider/Slide 3}} File:Slide 3 preview.jpg File:Slide 3 background.jpg
4 {{Slider/Slide 4}} File:Slide 4 preview.jpg File:Slide 4 background.jpg
5 {{Slider/Slide 5}} File:Slide 5 preview.jpg File:Slide 5 background.jpg
Updating images

The "background images" are the ones displayed as background in each slide. They have the same dimension as the template itself which has a fixed height of 450px and a width which changes depending on the reader screen resolution. Assuming the template has all content space available:

  • On screens with a width up to 1280px, the template will have a width of 664px.
  • On screens with a width from 1280px up to 1600px, the template will have a width of 704.
  • On screens with a width over 1600px, the template will have a width of 858px.

The "preview images" are those displayed in the main menù of the slider. The previews of the slides from #2 to #5 will be displayed with a resolution of 215x112.5px, while the preview of slide #1 will fully cover the template.

Therefore it's advised to use images with a resolution of 860x450px (and technically the preview images from #2 to #5 can have a resolution of just 125x113px). To update the image is sufficient to update the files, without having to edit any code.

Note: to increase performance and reduce loading time, it's advised to use images in JPG format, rather then PNG like this example, or alternately to compress them using a tool like this one.

Syntax

Type {{Slider}} where you want the slider to appear.

See Also
上方的文件 嵌入Template:Slider/doc, 您可以 進行變更檢視歷史變更. (這是怎麼運作的?)
若您已更改完成 請 重整文件. (為什麼要這麼做?)
您可以在此模板的 sandbox (create | mirror ) 與 testcases (create) 頁面,進行測試。
請加入 Template:Slider/doc頁面分類跨維基連結 (檢視此分頁的所有子頁面.)
除了特别提示,社区内容遵循CC-BY-SA 授权许可。