Documentation
Styling and Appearance
jQWidgets uses a pair of css files - jqx.base.css and jqx.[theme name].css. The base stylesheet creates the styles related to the widget's layout like margin, padding, border-width, position. The second css file applies the widget's colors and backgrounds. The jqx.base.css should be included before the second CSS file.
Below is the list of CSS classes used by jqxProgressBar.- jqx-widget - applied to the progressbar.
- jqx-progressbar - applied to the progressbar.
- jqx-progressbar-value - applied to the progressbar's value element.
- jqx-progressbar-value-vertical - applied to the progress bar's vertical value element- when the widget's orientation is 'vertical'.
- jqx-fill-state-pressed - applied to the progressbar's value element.
- jqx-widget-content - applied to the progressbar.
- jqx-progressbar-disabled - applied to the progress bar when the widget is in disabled state.
- jqx-fill-state-disabled - applied to the progress bar when the widget is in disabled state
- Add the above CSS classes related to jqxProgressBar
- After each CSS class, add your theme name.
For example:
jqx-progressbar-shinyblack - To apply your custom style to jqxProgressBar, you need to set its 'theme' property(option)
to point to your theme name string.
<script type="text/javascript"> $(document).ready(function () { // Create jqxProgressBar. $("#jqxprogressbar").jqxProgressBar({ theme: 'shinyblack', width: 250, height: 25, value: 50 }); });</script>
- The sample below demonstrates how to set the 'Shiny Black' theme to jqxProgressBar.
<!DOCTYPE html><html lang="en"><head> <title>jQuery ProgressBar - CSS Styling Sample</title> <link rel="stylesheet" href="../../jqwidgets/styles/jqx.base.css" type="text/css" /> <link rel="stylesheet" href="../../jqwidgets/styles/jqx.shinyblack.css" type="text/css" /> <script type="text/javascript" src="../../scripts/jquery-1.11.1.min.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxcore.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxprogressbar.js"></script> <script type="text/javascript"> $(document).ready(function () { // Create jqxProgressBar. $("#jqxprogressbar").jqxProgressBar({theme: 'shinyblack', width: 250, height: 25, value: 50 }); }); </script><script async src="https://www.googletagmanager.com/gtag/js?id=G-2FX5PV9DNT"></script><script>window.dataLayer = window.dataLayer || [];function gtag(){dataLayer.push(arguments);}gtag('js', new Date());gtag('config', 'G-2FX5PV9DNT');</script></head><body class='default'> <div id='jqxprogressbar'> </div> </body></html>