2018-12-28css制作简洁实用搜索框样式代码

css制作简洁实用搜索框样式代码如下:

  body,
  input,
  button {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  }
  .container { margin: 300px auto 40px auto; width: 800px; text-align: center; }
  a { color: #4183c4; text-decoration: none; font-weight: bold; }
  a:hover { text-decoration: underline; }
  h3 { color: #666; }
  ul { list-style: none; padding: 25px 0; }
  li {
    display: inline;
    margin: 10px 50px 10px 0px;
  }
  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;
  }
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

  • 第一部分 HTML&CSS整理答案 1. 什么是HTML5? 答:HTML5是最新的HTML标准。 注意:讲述HT...
    kismetajun阅读 28,828评论 1 45
  • 发现 关注 消息 iOS 第三方库、插件、知名博客总结 作者大灰狼的小绵羊哥哥关注 2017.06.26 09:4...
    肇东周阅读 15,431评论 4 61
  • 作为妈妈,我们总想把最好的东西给孩子。一日三餐,是再平常不过的事情了。但是,如何让孩子对每一次吃饭都津津有味,这对...
    春天里的霞光阅读 242评论 0 1
  • 人都有欲望,在这个物欲横流的世界,追求金钱是很多人的目标。车子房子,让多少人狂热。生财有道,于是各种挣钱的门路都出...
    红玫瑰和白汽球阅读 199评论 0 0

友情链接更多精彩内容