Add a color picker to your page by the following HTML markup:
<span class="colorpicker">
<span class="bgbox"></span>
<span class="hexbox"></span>
<span class="clear"></span>
<span class="colorbox">
<b class="selected" style="background:#A9BAD4" title="Light Blue"></b>
<b style="background:#A1A4B3" title="Stone Blue"></b>
<b style="background:#A49381" title="Sand"></b>
<b style="background:#626878" title="Charcoal"></b>
<b style="background:#2E436E" title="Navy Blue"></b>
</span>
</span>
Note:
- All color cells are defined as <b> tag contained in the span.colorbox. Each color is defined by its background style.
- Elements span.bgbox and span.hexbox are optional. span.bgbox indicates the selected color by its background color, and span.hexbox indicates the selected color by the color cell's title.
- Set class="selected" to the color cell that should be the default selected color.
- You can add multiple Custom Color Pickers on the same page.
0 comments:
Post a Comment