基于bootstrap的选择框插件icheck

本文实例为大家分享了bootstrap icheck选择框插件,供大家参考,具体内容如下

icheck官网:nofollow" target="_blank" href="http://www.bootcss.com/p/icheck/#skin-square">http://www.bootcss.com/p/icheck/#skin-square

1.到官网下载Icheck压缩包。

2.解压后找到 icheck.min.js,jquery.js,zepto.js 以及skins文件夹,复制到自己的项目中

3.在项目中引用

rush:xhtml;">

4.写输入框代码

rush:xhtml;"> Box"> dio" name="iCheck">

5.初始化

rush:js;"> $('input').iCheck({ checkBoxClass: 'icheckBox_minimal-red',radioClass: 'iradio_minimal-red',increaseArea: '20%',// optional labelHover: true,});

以上是icheck的一个简单实战教程。接下来再具体介绍一下

1、选择你要使用的皮肤样式主题,共6个(在skins文件下) flat,futurico,line,minimal,polaris,square 每个皮肤底下有好几个可以选择的颜色,例如:

Black — square.css

Red — red.css

Green — green.css

Blue — blue.css

Aero — aero.css

Grey — grey.css

Orange — orange.css

Yellow — yellow.css

Pink — pink.css

Purple — purple.css

2 .例如选择square皮肤下的blue.css,复制 skin/square文件夹下的到css文件夹下

3.引入icheck.js

移动端引入:

4 在页面添加以下代码

rush:xhtml;"> Box">

<input type="radio" name="iCheck">

导入的颜色样式与 checkBoxClass, radioClass 要一一对应,否则不起作用 如:

对应的是

rush:js;"> $('input').iCheck({ checkBoxClass: 'icheckBox_minimal-red',.........

});

以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持编程之家。

相关文章

Bootstrip HTML 查询搜索常用格式模版 &lt;form class=&...
如何在按钮上加红色数字 您可以使用Bootstrap的badge组件来在...
要让两个按钮左右排列,你可以使用 Bootstrap 的网格系统将它...
是的,可以将status设置为布尔类型,这样可以在前端使用复选...
前端工程师一般用的是Bootstrap的框架而不是样式,样式一般自...
起步导入:<linkrel="stylesheet"href="b...