简体   繁体   English

如何使对勾标记的颜色不同?

[英]How to make check mark's color different?

I have refered prettyCheckable . 我已经提到了prettyCheckable and tried to implement it. 并尝试实施它。 But didn't get success. 但是没有成功。 I want to implement checkbox same like it. 我想像这样实现复选框。 Anyone help me with this. 任何人都可以帮助我。 I used jsfiddle and apply following code. 我使用了jsfiddle并应用了以下代码。

<div class="input-wrapper">
<input type="checkbox" class="prettyCheckable" value="1" id="Test1" name="Test1" data-label="Right positioned label (no param)" />
</div>
<div class="input-wrapper">
<input type="checkbox" class="prettyCheckable" value="2" id="Test2" name="Test2" data-label='data-labelPosition="left"' data-labelPosition="left" />
</div>
<div class="input-wrapper">
<br/>
<div class="input-wrapper">
<input type="checkbox" class="prettyCheckable" value="1" id="color1" checked name="color1" data-label="Default (no-param)" />
</div>
<div class="input-wrapper">
<input type="checkbox" class="prettyCheckable" value="1" id="color2" checked name="color2" data-label='data-color="green"' data-color="green" />
</div>
</div>
</div>

could it be a mixup with doctypes?? 可能与doctypes混淆吗?

  • you are doing /> => html4 doctype 您正在做/> => html4 doctype
  • checked => html5 doctype checked => html5 doctype

Which doctype do you use? 您使用哪种文档类型?

Then you could check if jQuery was loaded before you load the prettyCheckable script? 然后,您可以在加载prettyCheckable脚本之前检查是否已加载jQuery?

Here is the CSS link of the page you are referring to http://arthurgouveia.com/prettyCheckable/js/prettyCheckable/prettyCheckable.css 这是您引用的页面的CSS链接http://arthurgouveia.com/prettyCheckable/js/prettyCheckable/prettyCheckable.css

You can check the code there. 您可以在那里查看代码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM