Pure css3 beautiful checkbox and radio beautifying effect plug-ins inserted Pretty.css

Plugin description

pretty.css is a pure css3 beautiful checkbox and radio beautifying effect. pretty.css can use a variety of fonts and icons combined for checkbox and radio native landscaping, you can also animate when the button is clicked.

Pure css3 beautiful checkbox and radio beautifying effect plug-ins inserted Pretty.css

Browser Compatibility

Pure css3 beautiful checkbox and radio beautifying effect plug-ins inserted Pretty.css

Course

pretty.css is a pure css3 beautiful checkbox and radio beautifying effect. pretty.css can use a variety of fonts and icons combined for checkbox and radio native landscaping, you can also animate when the button is clicked.

pretty.css support icon library are:

  • FONT AWESOME
  • BOOTSTRAP GLYPHICONS
  • MATERIAL DESIGN ICONS (MDI)
  • MATERIAL DESIGN ICONS (ZMDI)
  • TYPICONS
  • IONICONS
  • GOOGLE MATERIAL DESIGN ICONS

installation

It may be used bower, npm install or yarn pretty.css.

bower install pretty-checkbox
npm install pretty-checkbox
yarn add pretty-checkbox  
web前端开发学习Q-q-u-n: 731771211,分享学习的方法和需要注意的小细节,不停更新最新的教程和学习方法(详细的前端项目实战教学视频,PDF)

Instructions

Introducing pretty.min.css file and font icon library files needed in a page

<link rel="stylesheet" href="../PATH/pretty-checkbox/src/pretty.min.css"/>      
<link href="http://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
<link href="http://cdn.bootcss.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdn.materialdesignicons.com/1.8.36/css/materialdesignicons.min.css"/>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/material-design-iconic-font/2.2.0/css/material-design-iconic-font.min.css"/>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/typicons/2.0.7/typicons.min.css"/>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/ionicons/2.0.1/css/ionicons.min.css"/>

HTML structure

Checkbox basic HTML structure is as follows:

<div class="pretty primary">
  <input type="checkbox"/>
  <label><i class="mdi mdi-check"></i> Primary</label>
</div>

Radio basic HTML structure is as follows:

<div class="pretty">
  <input type="radio" name="radio">
  <label><i class="mdi mdi-check"></i> Option 1</label>
</div>
<div class="pretty">
  <input type="radio" name="radio">
  <label><i class="mdi mdi-check"></i> Option 2</label>
</div>

Which mdi mdi-*is the material design icons. If you want to use fontawesome, can be modified tofa fa-close

SCSS variables

pretty.css scss basic variables are set as follows:

$pretty--class-name: notsopretty; 
/* <div class="notsopretty circle"> */

$pretty--border-radius: 0;

$pretty--color-primary: #428bca;
$pretty--color-success: #5cb85c;
$pretty--color-info: #5bc0de;
$pretty--color-warning: #f0ad4e;
$pretty--color-danger: #d9534f;
$pretty--color-border: #b9b9b9;
$pretty--color-radio: #b9b9b9;
$pretty--color-bg: #fff;

/* Google material design icons */
$pretty--gmdi-class-name:'g-mdi';
$pretty--gmdi-name:'Material Icons';
$pretty--gmdi-attr:'data-icon';     

pretty.css the github address:https://lokesh-coder.github.i...

Note: For more on landscaping checkbox and radio plug-ins, welcome Comments, thank you.

Guess you like

Origin blog.51cto.com/14592820/2448011