Home > Web Front-end > HTML Tutorial > 自定义复选框 checkbox 样式_html/css_WEB-ITnose

自定义复选框 checkbox 样式_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:28:07
Original
941 people have browsed it

  默认的复选框样式一般在项目中都很少用 ,看起来也丑丑的。这里提供一个优化样式后的复选框。原理就是隐藏掉默认样式,在用设计好的样式替代

 

  html结构

<div>    <input type="checkbox"  name=""/>    <label class="check-all">全选</label></div>
Copy after login

js调用

$("#checkbox1").checkbox({reqUnit:function() {        console.log("点击复选框执行的后台操作");    },reqAll:function(){        console.log("点击全选复选框执行的后台操作");    }});
Copy after login

  demo 演示

都是比较小的功能。代码还需要优化。先记录在这里。有时间在优化

有需要的话。完整demo下载地址 checkBox.zip

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template