跳到内容

Add Background-Size to Customizer

v0.0.1

cmborchert · 2015年7月26日 上架

Allows you to control the background-size of your main background image from the comfort of the customizer, using predetermined values or custom CSS.

正在使用
40+
评分
5.0 / 5
累计下载
4,338
最近更新
2015年7月27日
1 条评价需要 WordPress 3.4.0+已测试到 4.2.39

贡献者

截图

Demonstrating custom CSS to create a tiled 100px by 100px background.
Demonstrating custom CSS to create a tiled 100px by 100px background.
Demonstrating "Cover" option.
Demonstrating "Cover" option.

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

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% height”: Height fits view perfectly, width may be smaller or larger than view (equivalent to css ‘auto 100%’).
– “Inherit”: Sets background size to whatever parent element is set to (html, in this case).
– “Custom”: Allows you to put in your own css to be applied in the section called “CSS for background-size (if ‘custom’ selected).”

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

https://developer.mozilla.org/en-US/docs/Web/CSS/background-size
or
http://www.w3schools.com/cssref/css3_pr_background-size.asp

Notes

Notes:
*The plugin works by adding styles to the body.custom-background class. If the default custom-background support has been disrupted, then this plugin will not work.

Plums

按场景查找 WordPress 插件。安装量、评分和兼容版本来自官方目录。

导航

说明

WordPress 是 WordPress Foundation 的商标。本站与 WordPress Foundation、Automattic 没有隶属关系。这里不托管插件文件,下载和安装以 WordPress.org 上的页面为准。

© 2026 Plums