[wordpress插件] Accordion Blocks手风琴块

wordpress 插件 文章 2020-01-25 16:00 682 0 全屏看文

AI助手支持GPT4.0

评分

100

100

描述

Accordion Blocks is a simple plugin that adds Gutenberg blocks for adding accordion drop-downs to your pages.

Accordion Blocks是一个简单的插件,它添加了Gutenberg块,用于向您的页面添加手风琴下拉列表。

The accordions should blend seamlessly with your theme.

手风琴应与您的主题无缝融合。

However, you may want to add custom styles to your theme.

但是,您可能想要向主题添加自定义样式。

Features

功能

    • Adds a Gutenberg block for adding accordions to your site.
    • 添加一个Gutenberg块以向您的站点添加手风琴。

    • Supports multiple accordions with individual settings for each accordion item.
    • 支持针对每个手风琴项进行单独设置的多个手风琴。

    • Fully responsive.
    • 反应迅速。

    • Support for item IDs and direct links.
    • 支持商品ID和直接链接。

    • Accessible (for users requiring tabbed keyboard navigation control).
    • 可访问(对于需要使用选项卡式键盘导航控制的用户)。

    Optional Features

    可选功能

      • Open individual accordion items by default.
      • 默认情况下打开各个手风琴项目。

      • Disable auto closing of accordion items.
      • 禁用自动关闭手风琴项目。

      • Manually close items by clicking the title again.
      • 通过再次单击标题来手动关闭项目。

      • Scroll page to title when it’s clicked open (including setting a scroll offset position).
      • 单击打开时滚动到标题(包括设置滚动偏移位置)。

      • Set the HTML heading tag for the title element (h1–h4, button).
      • 设置title元素(h1-h4,按钮)的HTML标题标签。

      Output

      输出

      The plugin will ultimately output following HTML (simplified for this example):

      该插件最终将输出以下HTML(此示例已简化):

        

      -auto-close="true" data-scroll="false" data-scroll-offset="0">    

      -auto-close =“ true” data-scroll =“ false” data-scroll-offset =“ 0”>    

              

      Title with H2 tag    

      带H2标签的标题    

          

          

      Custom CSS

      自定义CSS

      You can use the following CSS classes to customize the look of the accordion.

      您可以使用以下CSS类来自定义手风琴的外观。

      .c-accordion__item {} /* The accordion item container */

        .c-accordion__item {} / *手风琴项目容器* /

      .c-accordion__item.is-open {} /* is-open is added to open accordion items */

      .c-accordion__item.is-open {} / * is-open添加到打开的手风琴项目中* /

      .c-accordion__item.is-read {} /* is-read is added to accordion items that have been opened at least once */

      .c-accordion__item.is-read {} / * is-read被添加到至少打开过一次的手风琴中* /

      .c-accordion__title {} /* An accordion item title */

      .c-accordion__title {} / *手风琴项目标题* /

      .c-accordion__title--button {} /* An accordion item title that is using a `

安装步骤

    1. Upload the ‘accordion-blocks’ folder to the ‘/wp-content/plugins/’ directory.
    2. 将“手风琴方块”文件夹上传到“ / wp-content / plugins /”目录。

    3. Activate the plugin through the Plugins menu in WordPress.
    4. 通过WordPress中的“插件”菜单激活插件。

    5. Add the accordions to your content.
    6. 将手风琴添加到您的内容中。

下载地址

https://downloads.wordpress.org/plugin/accordion-blocks.1.0.6.zip

https://downloads.wordpress.org/plugin/accordion-blocks.1.0.6.zip

-EOF-

AI助手支持GPT4.0