本文介绍了JuiceUI更改主题/风格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以选择更改JuiceUI控件的样式?任何预定义主题? (如果是的话,我找不到任何关于它的文档。)我是否像其他控件一样使用常规CSS来设置它们? (这似乎也不起作用。)

Is there an option to change the styles of JuiceUI controls? Any predefined themes? (If yes, I couldn't find any documentation on it.) Do I style them with regular CSS like other controls? (That didn't seem to work either.)

TIA

编辑:按钮的外观如下: (我没有预先安装的jquery主题 - 这是一个新网站。)




我注意到JuiceUI安装了一个内容 - 主题文件夹,包含base,Fresh-Squeezed和Supercharged。

Here's how the button looks: (I had no preinstalled jquery themes in this one - this is a new website.)


I did notice JuiceUI installed a content - themes folder with base, Fresh-Squeezed and Supercharged.

Don不知道它被引用的位置以及如何更改它。

Don't know where it's being referenced though and how to change it.

推荐答案

目前,JuiceUI的来源可能是你的最好的朋友。看看这一行:

At the moment, the source for JuiceUI can be your best friend. Check out this line: https://github.com/appendto/juiceui/blob/master/Juice/JuiceApp.cs#L52

这是你想要添加到Global.asax.cs的内容:

This is what you'll want to add to Global.asax.cs:

CssManager.CssResourceMapping.AddDefinition("juice-ui", new CssResourceDefinition {
    Path = "~/Content/themes/[Name of custom theme dir]/jquery-ui-1.8.18.custom.css",
    DebugPath = "~/Content/themes/[Name of custom theme dir]/jquery-ui-1.8.18.custom.css"
});

这将重新定义juice-ui渲染主题的位置,你会看到每个页面中的输出使用。

This will redefine the location of the "juice-ui" rendered theme, and you'll see that output in each page juice is used on.

对不起,目前这不是更明显。我们正在计划一系列文章来涵盖这些主题,并且更新网站上的文档已经在进行中。

Sorry this isn't more obvious at the moment. We're planning on a series of articles to cover topics such as these and updating the documentation on the site is already in the works.

这篇关于JuiceUI更改主题/风格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-12 19:20