Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

jQuery UI Theme Design

jQuery UI Theme Design

File structure

Themes add usability in a specific way. Typically, the file directory structure is as follows:

For an example of how the theme file structure is completed, visit jQuery UI Basic Theme。

Defining styles

Writing styles for a theme is very simple because of the flexibility of themes.

All themes should have a basic CSS class. This main class allows users to enable or disable the theme. The format of your root class should be .ui-themename. And its usage in an HTML file is as follows:







    My Site

    

    

    





    
This is a modal dialog.

In the example above, several important things happen:

If we open the themename.css file to view it, we can see the following code:



body.ui-themename { background:#111; color:snow; }

.ui-themename a, a.ui-themename { color:#68D; outline:none; }

.ui-themename a:visited, a.ui-themename:visited { color:#D66; }

.ui-themename a:hover, a.ui-themename:hover { color:#FFF; }

Please note,themename.css The file includes only globally common style information; plugin-specific styles are not defined here. The styles here apply to all themes. Do not worry about a theme spanning multiple files - these are simplified during the creation and download process.