我正在尝试链接到来自style.css的WordPress插件文件夹中的图像。我试过以下,但不工作:如何从style.css链接到WordPress插件文件夹?
.example {
background: url(images/photo.jpg) center center no-repeat;
}
Plugins文件夹图片: /wp-content/plugins/my-plugin/images/photo.jpg
样式表是这里: /wp-content/themes/my-theme/style.css
在您的插件文件夹中添加css和图像使用插件url获取此内容。 –
我不想有很多CSS文件 – henrywright