基于Bootstrap实现Material Design风格表单插件 附源码下载

作者:爱上程序猿 时间:2024-05-03 15:33:11 

Jquery Material Form Plugin是一款基于Bootstrap的Material Design风格的jQuery表单插件。该表单通过自定义样式和jQuery来将Bootstrap的表单修改为扁平风格的表单,并带有浮动标签特效。

基于Bootstrap实现Material Design风格表单插件 附源码下载

在线预览         源码下载

使用方法

使用该Material Design风格表单需要在页面中引入jquery,bootstrap相关文件和materialFormStyles.css、materialForm.js文件。


<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.6/css/bootstrap.min.css">
<link rel="stylesheet" href="css/materialFormStyles.css">
<script src="js/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.6/js/bootstrap.min.js"></script>
<script src="js/materialForm.js"></script>

HTML结构

该Material Design风格表单的HTML结构是固定的,你可以复制下面的代码。


<div class="container" id="formOutterWrapper">
<div class="container" id="formInnerWrapper">
<form id="materialForm" class="form" method="post" action="" role="form" autocomplete="off">
<div class="form-group">
<div class="col-xs-6">
<label class="labels" for="firstName">用户名称</label>
<input type="text" class="formInput" id="firstName" name="firstName">
</div>
<div class="col-xs-6">
<label class="labels" for="lastName">昵称</label>
<input type="text" class="formInput" id="lastName" name="lastName">
</div>
</div>
<div class="form-group">
<div class="col-xs-6">
<label class="labels" for="email">电子邮件</label>
<input type="text" class="formInput" id="email" name="email">
</div>
<div class="col-xs-6">
<label class="labels" for="phone">联系电话</label>
<input type="tel" class="formInput" id="phone" name="phone">
</div>
</div>
<div class="form-group">
<div class="col-xs-12">
<label class="labels" for="description">项目描述</label>
<input type="text" class="formInput" id="description" name="description">
</div>
</div>
<div class="form-group">
<div class="col-xs-12">
<button type="button" class="btn btn-primary green flatButton" id="submit">提交</button>
</div>
</div>
</form>
</div>
</div>

该表单插件的github地址为:https://github.com/ch0chi/Jquery-Material-Form-Plugin

标签:bootstrap,material,design,风格,表单
0
投稿

猜你喜欢

  • Flask框架工厂函数用法实例分析

    2023-03-08 08:14:30
  • 基于AJAX技术提高搜索引擎排名

    2008-01-24 12:45:00
  • python不到50行代码完成了多张excel合并的实现示例

    2023-04-11 10:41:39
  • HTML在线编辑器的实现难点

    2010-06-26 12:58:00
  • 47个惊人的CSS3动画演示

    2010-02-07 12:32:00
  • Python爬虫之超级鹰验证码应用

    2021-04-08 08:22:20
  • 简单有效上手Python3异步asyncio问题

    2022-01-14 02:28:34
  • pyecharts如何实现显示数据为百分比的柱状图

    2021-06-27 17:11:52
  • MySQL创建高性能索引的全步骤

    2024-01-26 16:56:58
  • Zabbix 2.4.5自带MySQL监控的配置使用教程

    2024-01-24 06:00:52
  • Vue+ElementUI实现表单动态渲染、可视化配置的方法

    2024-04-27 15:56:15
  • SQL JOIN 连接详细介绍及简单使用实例

    2024-01-22 00:27:50
  • zabbix监控MySQL主从状态的方法详解

    2024-01-22 00:29:24
  • 简单理解PHP的面向对象编程方式

    2023-06-13 15:38:08
  • 可爱动态背景输入框

    2009-05-07 13:50:00
  • Navicat For MySQL的简单使用教程

    2024-01-17 12:22:02
  • 根据Dreamweaver里的ToolTip代码改进的提示框

    2008-11-27 12:19:00
  • MySQL Group By用法

    2012-01-05 19:05:14
  • ASP连接MySQL数据库的方法

    2010-03-14 11:25:00
  • mysql-8.0.15-winx64 解压版安装教程及退出的三种方式

    2024-01-23 21:56:20
  • asp之家 网络编程 m.aspxhome.com