[wordpress插件] Add Background-Size to Customizer将背景尺寸添加到定制程序

wordpress 插件 文章 2020-01-29 13:00 0 180 全屏看文
评分

100

100

描述

This plugin for WordPress adds a background-size controller to the Background Image section in the WordPress Customizer.

此WordPress插件在WordPress自定义程序的“背景图片”部分中添加了背景尺寸控制器。

You can access the new controller by going to Appearance > Customize from the Dashboard, and clicking on the Background Image section.

您可以通过以下方式访问新控制器:从仪表板转到外观>自定义,然后单击背景图像部分。

Once you’ve added your custom background image, you can set your background-image size to:
 

添加自定义背景图片后,您可以将背景图片的大小设置为:
 

– “Cover”: As large as possible;

–“封面”:尽可能大;

fills entire view, with cropping.
 

裁剪可填充整个视图。
 

– “Contain”: As large as possible, without cropping;

–“包含”:尽可能大,不修剪;

fits inside of view.
 

适合视图内。
 

– “100% width”: Width fits view perfectly, height may be smaller or larger than view (equivalent to css ‘100% auto’).
 

–“ 100%宽度”:宽度完全适合视图,高度可能小于或大于视图(相当于CSS的“ 100%自动”)。
 

– “100% height”: Height fits view perfectly, width may be smaller or larger than view (equivalent to css ‘auto 100%’).
 

–“ 100%高度”:高度完全适合视图,宽度可能小于或大于视图(相当于CSS的“自动100%”)。
 

– “Inherit”: Sets background size to whatever parent element is set to (html, in this case).
 

–“继承”:将背景大小设置为任何父元素设置为的大小(在这种情况下为html)。
 

– “Custom”: Allows you to put in your own css to be applied in the section called “CSS for background-size (if ‘custom’ selected).”

–“自定义”:允许您放入自己的CSS,以在“背景尺寸的CSS(如果选择了“自定义”的情况下)的CSS”部分中应用。

To learn more about the CSS background-size property, go to:

要了解有关CSS background-size属性的更多信息,请访问:

https://developer.mozilla.org/en-US/docs/Web/CSS/background-size

https://developer.mozilla.org/zh-CN/docs/Web/CSS/background-size

or


http://www.w3schools.com/cssref/css3_pr_background-size.asp

http://www.w3schools.com/cssref/css3_pr_background-size.asp

Notes

注释

Notes:

注释:

*The plugin works by adding styles to the body.custom-background class.

*该插件通过向body.custom-background类添加样式来工作。

If the default custom-background support has been disrupted, then this plugin will not work.

如果默认的自定义背景支持已中断,则此插件将无法使用。

安装步骤

    1. Upload add-bg-size-to-customizer.php to the /wp-content/plugins/ directory
    2. add-bg-size-to-customizer.php 上传到 / wp-content / plugins / 目录

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

    That’s it!

    就这样!

下载地址

https://downloads.wordpress.org/plugin/add-background-size-to-customizer.zip

https://downloads.wordpress.org/plugin/add-background-size-to-customizer.zip

-EOF-