這個外掛並未在最新的 3 個 WordPress 主要版本上進行測試。開發者可能不再對這個外掛進行維護或提供技術支援,並可能會與更新版本的 WordPress 產生使用上的相容性問題。

CSS-Only Lightbox

描述

Adds a [css_lightbox …] shortcode that generates a CSS-only lightbox for a given image (by URL). Also includes a TinyMCE toolbar button for more easily including the needed attributes for the shortcode.

安裝

  1. Upload the plugin files to the /wp-content/plugins/plugin-name directory, or install the plugin through the WordPress plugins screen directly.
  2. Activate the plugin through the ‘Plugins’ screen in WordPress

常見問題

How do I add a lightbox?
  1. Copy and paste the complete URL for the image you want to make a lightbox for into the WordPress editor
  2. Select the URL with your cursor
  3. Click the “Lightbox” button in the TinyMCE toolbar
  4. Enter the values you’re prompted for. The only one that’s required is a unique ID for the image

OR

  1. Copy and paste the complete URL for the image you want to make a lightbox for into the WordPress editor
  2. Add the opening shortcode, [css_lightbox …] before the beginning of the URL and add the options you want
  3. Attributes you can use with the shortcode are:

* “id” (unique identifier for the image, required)
* “height” (in pixels, without including px)
* “width” (in pixels, without including px)
* “title” (a title for image, displayed when it’s enlarged)
* “caption” (a caption for the image, displayed when it’s enlarged)
* “alt” (alt text for the on-page image)
* “icon” (‘true’ or ‘false’ – whether or not to include a small magnifying glass icon in the top-left of the on-page image, to indicate that it can be enlarged)
1. An example using all of the available options: [css_lightbox id=”uniqueID” height=”400″ width=”400″ title=”A title” caption=”A caption” alt=”Some alt text” icon=”true”]Image URL[/css_lightbox]

What features are coming?
  • The option to use other units for the image dimension, including %, em, rem, vw, and vh
  • Send me suggestions in the support forum!

評價

There are no reviews for this plugin.

貢獻者及開發者

“CSS-Only Lightbox” 是一個開源的軟體。以下的人對這個外掛作出了貢獻。

貢獻者

將 CSS-Only Lightbox 外掛本地化為台灣繁體中文版。

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

修改日誌

1.0

First version:
* Adds shortcode
* Adds TinyMCE plugin and button to make the shortcode easier to use