热门关键字:
jquery > jquery插件 > html5 > css3实现超好看的搜索框和按钮

css3实现超好看的搜索框和按钮

11672
所属分类:html5
发布时间:2014/3/24 13:59:05
下载量:1356
评论数:1
转载请自觉注明原文:http://www.jq-school.com/Detail.aspx?id=424

此作品是一款非常实用的css3特效,实现了超好看的搜索框和按钮样式,主要还是用了普通的样式代码,添加了部分css3元素代码, border-radius ,moz-box-sizing,webkit-touch-callout,webkit-user-select,transition,box-shadow等,作品可以直接拿来使用。。。


核心样式代码如下:


  input[type=text],
  input[type=password] {
	font-size: 13px;
	min-height: 32px;
	margin: 0;
	padding: 7px 8px;
	outline: none;
	color: #333;
	background-color: #fff;
	background-repeat: no-repeat;
	background-position: right center;
	border: 1px solid #ccc;
	border-radius: 3px;
	box-shadow: inset 0 1px 2px rgba(0,0,0,0.075);
	-moz-box-sizing: border-box;
	box-sizing: border-box;
	transition: all 0.15s ease-in;
	-webkit-transition: all 0.15s ease-in 0;
	vertical-align: middle;
  }
  .button {
	position: relative;
	display: inline-block;
	margin: 0;
	padding: 8px 15px;
	font-size: 13px;
	font-weight: bold;
	color: #333;
	text-shadow: 0 1px 0 rgba(255,255,255,0.9);
	white-space: nowrap;
	background-color: #eaeaea;
	background-image: -moz-linear-gradient(#fafafa, #eaeaea);
	background-image: -webkit-linear-gradient(#fafafa, #eaeaea);
	background-image: linear-gradient(#fafafa, #eaeaea);
	background-repeat: repeat-x;
	border-radius: 3px;
	border: 1px solid #ddd;
	border-bottom-color: #c5c5c5;
	box-shadow: 0 1px 3px rgba(0,0,0,.05);
	vertical-align: middle;
	cursor: pointer;
	-moz-box-sizing: border-box;
	box-sizing: border-box;
	-webkit-touch-callout: none;
	-webkit-user-select: none;
	-khtml-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
	-webkit-appearance: none;
  }
  .button:hover,
  .button:active {
	background-position: 0 -15px;
	border-color: #ccc #ccc #b5b5b5;
  }
  .button:active {
	background-color: #dadada;
	border-color: #b5b5b5;
	background-image: none;
	box-shadow: inset 0 3px 5px rgba(0,0,0,.15);
  }
  .button:focus,
  input[type=text]:focus,
  input[type=password]:focus {
	outline: none;
	border-color: #51a7e8;
	box-shadow: inset 0 1px 2px rgba(0,0,0,.075), 0 0 5px rgba(81,167,232,.5);
  }
 
  label[for=search] {
	display: block;
	text-align: left;
  }
  #search label {
	font-weight: 200;
	padding: 5px 0;
  }
  #search input[type=text] {
	font-size: 18px;
	width: 705px;
  }
  #search .button {
	padding: 10px;
	width: 90px;
  }


效果如下:

css3实现超好看的搜索框和按钮





如果您觉得本作品对您的学习有所帮助:支付鼓励



关键字:css3 表单验证 css美化 搜索框特效 搜索引擎
  • css3实现超好看的搜索框和按钮如果你喜欢学院的资源就下载吧,亲,谢谢!
  • css3实现超好看的搜索框和按钮
  • css3实现超好看的搜索框和按钮
  • 提示:如果网络问题无法下载,请多尝试几次,与 网站管理员联系 或 本站留言 !

声明: 本站内容均为网友原创或整理于互联网,版权归作品最初创作人,转载请注明(出处)原文链接,转载前请邮件至磐temdy@qq.com,一旦发现造成侵权行为,后果自负。。

友荐云推荐