当前位置: 首页 > 软件库 > Web应用开发 > CSS框架 >

Magic-Input

CSS3 复选和单选样式工具
授权协议 MIT
开发语言 HTML/CSS
所属分类 Web应用开发、 CSS框架
软件类型 开源软件
地区 国产
投 递 者 闾丘选
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

CSS3样式复选框和单选按钮看起来更漂亮。只有一个input元素。在线demo
源码:https://github.com/dcsite/magic-input

使用

$ npm install magic-input

你需要引入 dist/magic-input.css或者dist/magic-input.min.css 文件到你的工程或者HTML中。如果你使用Stylus 你就可以使用 magic-input.styl 文件

<link rel="stylesheet" type="text/css" href="dist/magic-input.min.css">

Checkbox iPhone 的样式

<input type="checkbox" class="mgc-switch mgc-sm" checked /> <input type="checkbox" class="mgc-switch" /> <input type="checkbox" class="mgc-switch mgc-lg" checked />

Checkbox

<input type="checkbox" class="mgc" checked/> Default <input type="checkbox" class="mgc mgc-primary" checked /> Primary <input type="checkbox" class="mgc mgc-success" /> Success <input type="checkbox" class="mgc mgc-info" checked /> Info <input type="checkbox" class="mgc mgc-warning" checked /> Warning <input type="checkbox" class="mgc mgc-danger" checked /> Danger

Radios

<input type="radio" name="radio3" class="mgr mgr-sm"/> Default <input type="radio" name="radio3" class="mgr mgr-primary" /> Primary <input type="radio" name="radio3" class="mgr mgr-success mgr-lg" checked/> Success <input type="radio" name="radio3" class="mgr mgr-info mgr-sm" /> Info <input type="radio" name="radio3" class="mgr mgr-warning" /> Warning <input type="radio" name="radio3" class="mgr mgr-danger mgr-lg" /> Danger

设置input大小的class

sm 是 small的缩写 , lg 是 large缩写

在 Checkbox中设置下面class

    mgc-sm mgc-lg

在 Radio Button中设置下面

    mgr-sm mgr-lg

改变颜色的 Class

在 Checkbox中设置下面class

    mgc-primary mgc-info mgc-success mgc-warning mgc-danger

在 Radio Button中设置下面
mgr-primary mgr-info mgr-success mgr-warning mgr-danger

  • 更改默认样式为: HTML <input class="magic-checkbox" type="checkbox" name="layout" id="yyc1"> <label for="yyc1"></label> 复制代码 CSS .magic-checkbox { position: absolute; display: none; } .magic-checkbox[di

  • <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); /** * CodeIgniter * * An open source application development framework for PHP 5.1.6 or newer * * @package CodeIgniter

  • D2. Magic Powder - 2      time limit per test             1 second      memory limit per test       256 megabytes   Waking up in the morning, Apollinaria decided to bake cookies. To bake one cookie, s

  • Ext4magic-Install     Ext4magic: Inode - Directory - Journal - Install - Time_Options - Histogram - Scenarios - Tips&Tricks - Manpage - Expert-Mode   If not available a ready install package for your

  • D2. Magic Powder - 2 time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output The term of this problem is the same as the previous one, the only exc

  • Linux resize2fs: Bad magic number in super-block错误的解决方法 2018年05月23日 11:03:19 生命只剩百分之一 阅读数 8543 版权声明:本文为博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接和本声明。 本文链接:https://blog.csdn.net/qq_22083251/article/detai

  •  Magic Powder - 1   CodeForces - 670D1  This problem is given in two versions that differ only by constraints. If you can solve this problem in large constraints, then you can just write a single solu

  • BaoBao is a lazy boy. He has nn pairs of socks in different colours and he washes them once a month. In the washing machine, these socks will be mixed. Because there are too many socks that need to be

  • <el-form-item label="密码"> <el-input v-model="agent.password" type="password" style="position:fixed;bottom:-9999px;display:none;"></el-input> <el-input v-model="agent.password" type="password

 相关资料
  • 问题内容: 如何设置HTML复选框,单选按钮和下拉菜单的样式?可以吗 我想为复选框或单选按钮使用图像,对列表使用相同的图像-下拉箭头在大多数情况下看起来不太好。 问题答案: 请参阅jQuery插件的2个链接(用于样式化复选框和单选按钮): http://line25.com/articles/jquery-plugins-for-styling-checkbox-radio- buttons ht

  • 问题内容: 好的,因此我在网络上看到了许多用于通过CSS设置复选框样式的解决方案。但是,我正在寻找更强大的功能,而且我想知道是否有人可以提供帮助。基本上,我想拥有这个解决方案,但是能够将CSS特定颜色覆盖在灰色复选框上。我需要这样做是因为我会有许多不同的复选框,每个复选框需要不同的颜色,而且我不想创建大量不同的图像来处理此问题。有人对如何实现这一目标有任何想法吗? 问题答案: 我创建了一个透明的p

  • 这是一个 列表 拓展,可以用来创建单选和复选按钮组。 复选按钮组 <div class="list-block"> <ul> <!-- Single chekbox item --> <li> <label class="label-checkbox item-content"> <!-- Checked by default -->

  • 问题内容: 任何样式都会影响每个输入元素。有没有一种方法可以指定仅应用于复选框的样式,而无需将类应用于每个复选框元素? 问题答案: 使用CSS 2,您可以执行以下操作: 到目前为止,这应该得到广泛的支持。

  • 本文向大家介绍CSS样式选择选项,包括了CSS样式选择选项的使用技巧和注意事项,需要的朋友参考一下 要为<select>中的选项设置样式,您可以尝试运行以下代码, 示例

  • 我有选择。我有一些商品。 我需要改变它的风格 这里是这个选择的html 我需要更改选项的样式,所以我在css中写了这个。 但它不起作用 如果我这样写 一切都很好 以下是截图 我的问题在哪里?

  • 问题内容: 如何在Firefox中设置复选框样式,并取消选中标记和边框? CSS: HTML: 问题答案: input[type=”checkbox”] {

  • 我试图创建一个复选框标签,其中复选框本身是隐藏的,但标签没有因此点击标签,选中复选框,即使没有显示。 我想做的是,当它被选中时,标签保持红色,为此我为复选框活动指定了一个类,但它不起作用。它可以在悬停状态下正常工作,但不能在活动状态下正常工作。当我单击它时,复选框会选中,但标签不会读取活动类。 有什么想法吗? 我使用以下html: 还有下面的css