CSS3实现带动画、阴影的表单提示特效

  • CSS3实现带动画、阴影的表单提示特效,Form表单提示效果,请不要使用IE浏览,否则你会错过很多精彩的效果,在火狐下你会看到,漂亮的带阴影的表单文本框,而且是圆角的,当鼠标点击表单框的时候出现动画的提示效果,相信你看了之后会喜欢的。

<!DOCTYPE HTML>

<html lang="en-US">

<head>

<meta charset="UTF-8">

<title>石家庄标准件</title>

<style type="text/css" media="screen">

form {

margin: 20px 0 18px;

}

fieldset {

padding: 0;

margin: 0;

border: 0;

}

label,

input,

button{

font-size: 13px;

font-weight: normal;

line-height: 18px;

}

input,

button{

font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;

}

label {

display: block;

margin-bottom: 5px;

color: #333333;

}

input{

display: inline-block;

width: 210px;

height: 18px;

padding: 4px;

margin-bottom: 9px;

font-size: 13px;

line-height: 18px;

color: #555555;

border: 1px solid #cccccc;

-webkit-border-radius: 3px;

-moz-border-radius: 3px;

border-radius: 3px;

}

input[type="button"],

input[type="reset"],

input[type="submit"] {

width: auto;

height: auto;

}

input {

-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);

-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);

box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);

-webkit-transition: border linear 0.2s, box-shadow linear 0.2s;

-moz-transition: border linear 0.2s, box-shadow linear 0.2s;

-ms-transition: border linear 0.2s, box-shadow linear 0.2s;

-o-transition: border linear 0.2s, box-shadow linear 0.2s;

transition: border linear 0.2s, box-shadow linear 0.2s;

}

input:focus,

textarea:focus {

border-color: rgba(82, 168, 236, 0.8);

-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6);

-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6);

box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6);

outline: 0;

outline: thin dotted \9;

/* IE6-9 */

}

input{

margin-left: 0;

}

input:focus:required:invalid,

textarea:focus:required:invalid,

select:focus:required:invalid {

color: #b94a48;

border-color: #ee5f5b;

}

input:focus:required:invalid:focus,

textarea:focus:required:invalid:focus,

select:focus:required:invalid:focus {

border-color: #e9322d;

-webkit-box-shadow: 0 0 6px #f8b9b7;

-moz-box-shadow: 0 0 6px #f8b9b7;

box-shadow: 0 0 6px #f8b9b7;

}

:-moz-placeholder {

color: #999999;

}

::-webkit-input-placeholder {

color: #999999;

}

.help-block,

.help-inline {

color: #555555;

}

.help-block {

display: block;

margin-bottom: 9px;

}

.help-inline {

display: inline-block;

*display: inline;

/* IE7 inline-block hack */

*zoom: 1;

vertical-align: middle;

padding-left: 5px;

}

.form-horizontal input,

.form-horizontal .help-inline {

display: inline-block;

margin-bottom: 0;

}

.control-group {

margin-bottom: 9px;

}

.form-horizontal .control-group {

margin-bottom: 18px;

*zoom: 1;

}

.form-horizontal .control-group:before,

.form-horizontal .control-group:after {

display: table;

content: "";

}

.form-horizontal .control-group:after {

clear: both;

}

.form-horizontal .control-label {

float: left;

width: 140px;

padding-top: 5px;

text-align: right;

}

.form-horizontal .controls {

margin-left: 160px;

/* Super jank IE7 fix to ensure the inputs in .input-append and input-prepend don‘t inherit the margin of the parent, in this case .controls */

*display: inline-block;

*margin-left: 0;

*padding-left: 20px;

}

.form-horizontal .help-block {

margin-top: 9px;

margin-bottom: 0;

}

.form-horizontal .form-actions {

padding-left: 160px;

}

/*helps info*/

.form-horizontal .help-inline {

position: relative;

padding: 3px 6px;

background: #444;

color: #fff;

z-index: -2;

border-radius: 3px;

-webkit-transition:all 0.5s;

-moz-transition:all 0.5s;

-o-transition:all 0.5s;

-ms-transition:all 0.5s;

transition:all 0.5s;

position: relative;

margin-left: -500px;

}

.form-horizontal .help-inline::before {

content:"";

display: block;

height: 0;

width: 0;

position: absolute;

top: 7px;

left: -12px;

border: 6px solid transparent;

border-right-color: #444;

z-index: 2;

}

.controls {

position: relative;

overflow: hidden;

}

.form-horizontal .help-block {

background: #444;

border-radius: 3px;

padding: 3px 6px;

position: absolute;

top: 28px;

left: 0;

z-index: -2;

color: #fff;

-webkit-transition:all 0.5s;

-moz-transition:all 0.5s;

-o-transition:all 0.5s;

-ms-transition:all 0.5s;

transition:all 0.5s;

}

.form-horizontal .help-block::after {

border: 6px solid transparent;

border-bottom-color: #444;

content:"";

display: block;

height:0;

width: 0;

left: 5px;

top: -12px;

z-index: 2;

position: absolute;

}

.form-horizontal input:active + .help-inline,

.form-horizontal input:focus + .help-inline {

margin-left: 8px;

}

.form-horizontal .controls-block input:active,

.form-horizontal .controls-block input:focus {

margin-bottom: 35px;

}

</style>

</head>

<body>

<h1>ZAOLE.NET</h1>

<form action="#" method="post" class="form-horizontal">

<fieldset>

<div class="control-group">

<label for="email" class="control-label">E-Mail:</label>

<div class="controls controls-inline">

<input type="email" id="email" />

<span class="help-inline">Please Input Your Email!</span>

</div>

</div>

<div class="control-group">

<label for="password" class="control-label">Password:</label>

<div class="controls controls-inline">

<input type="password" id="password" />

<span class="help-inline">Please Input Your Password!</span>

</div>

</div>

</fieldset>

<fieldset>

<div class="control-group">

<label for="email" class="control-label">E-Mail:</label>

<div class="controls controls-block">

<input type="email" id="email" />

<span class="help-block">Please Input Your Email!</span>

</div>

</div>

<div class="control-group">

<label for="password" class="control-label">Password:</label>

<div class="controls controls-block">

<input type="password" id="password" />

<span class="help-block">Please Input Your Password!</span>

</div>

</div>

</fieldset>

</form>

</body>

</html>

CSS3实现带动画、阴影的表单提示特效

时间: 2024-10-24 01:57:04

CSS3实现带动画、阴影的表单提示特效的相关文章

基于jQuery+CSS3点击动画弹出表单代码

分享一款基于jQuery+CSS3点击动画弹出表单代码是一款鼠标点击图标按钮动画弹出表单特效代码.效果图如下: 在线预览   源码下载 实现的代码. html代码: <div class="buttonCollection"> <div class="qutton" id="qutton_upload"> <div class="qutton_dialog" id="uploadDial

一款纯css3实现的超炫3D表单

今天要给大家分享一款纯css3实现的超炫3D表单.该特效页面的加载的时候3d四十五度倾斜,当鼠标经过的时候表单动画回正.效果非常炫,一起看下效果图: 在线预览   源码下载 实现的代码. html代码: <div id="face"> <div id="content"> <p> <input type="text" placeholder="Name" /></p>

DIV+CSS+JS仿Select下拉表单网页特效源代码下载

DIV+CSS+JS仿Select下拉表单 原文:DIV+CSS+JS仿Select下拉表单网页特效源代码下载 源代码下载地址:http://www.zuidaima.com/share/1550463331830784.htm <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <

struts2 自带的 token防止表单重复提交拦截器

在struts2中,我们可以利用struts2自带的token拦截器轻松实现防止表单重复提交功能! 1. 在相应的action配置中增加:  <interceptor-ref name="token"></interceptor-ref> <result name="invalid.token">/error.jsp</result> 2. 增加error.jsp文件,代码如下:  <h1>禁止重复提交&l

用css3和jQuery制作精美的表单

用css3和jQuery制作一个简单的精美表单 html代码如下: <span class="title">Mask Your Input Forms and Make It Beauty</span> <br/><br/> <div id="container"> <p class="separator"><br/></p> <p class=

vue.js带复选框表单的增删改差

近段时间由于公司项目要求,前端开始使用VUE框架进行开发,最近刚开始学习,做了一个表单的增删改查,和大家分享一下. 页面模型代码设计如下 <template> <div id="navi_108_page"> <i-button type="info" @click="adds">添加类型</i-button> <i-button type="warning" @click

jquery ui 常用(二)(对话框 | 旋转器 | 工具提示框(表单) | 特效(百叶窗) )

一.添加信息的对话框  http://www.w3cschool.cc/try/tryit.php?filename=jqueryui-example-dialog-modal-form. 模态表单 | 模态消息 二.滑块(可以用在延时天数) http://www.w3cschool.cc/jqueryui/example-slider.html http://www.w3cschool.cc/try/tryit.php?filename=jqueryui-example-slider-rang

Yii2提交表单提示无法验证

yii2使用gii生成的搜索视图里的表单使用的是get方式,我改为post就提示无法验证,以为是控制器默认访问是get,实际默认是get和post都可以 public function behaviors() { return [ 'verbs' => [ 'class' => VerbFilter::className(), 'actions' => [ 'delete' => ['post'], ], ], ]; } 之所以提示无法验证是因为对于post请求,是有一个CSRF验

JQuery实现的智能表单提示

实现一个类似如此效果的表单验证: 1.前台一开始用JQuery实现,先来上HTML标记: <body>    <form id="form1" runat="server">    <table class="tble">    <tr><td class="td1">用户名 <input type="text" class="td