排名
6
文章
6
粉丝
16
评论
8
{{item.articleTitle}}
{{item.blogName}} : {{item.content}}
ICP备案 :渝ICP备18016597号-1
网站信息:2018-2024TNBLOG.NET
技术交流:群号656732739
联系我们:contact@tnblog.net
公网安备:50010702506256
欢迎加群交流技术
分类:
CSS
无图无真相效果如下:
思路:就正常放这些选择框,输入框,按钮,然后把这些本身的边框去掉,在在外面的div整一个统一的边框...看上去就是这种效果了...
html代码如下:
<div id="search"> <div id="search-wrap"> <select class="search-choise"> <option>课程</option> <option>资源</option> </select> <input class="search-content" type="text" placeholder="输入搜索内容" name="word"> <button class="search-btn" type="submit">搜索</button> </div> </div>
样式:
<style> #search { position: relative; width: 680px; } #search-wrap { position: absolute; /* margin-top: -10px; */ width: 460px; height: 36px; margin-left: 16px; border-radius: 18px; box-shadow: 0 0 3px rgba(0, 0, 0, .14); background-color: #FFF; } #search-wrap .search-content { box-shadow: none; border: 0 none; outline: none; font-family: "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", Arial, Helvetica, sans-serif; margin-top: 3px; margin-left: 18px; width: 298px; height: 30px; } #search-wrap .search-choise { box-shadow: none; border: 0 none; outline: none; margin-left: 18px; font-family: "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", Arial, Helvetica, sans-serif; } #search-wrap .search-choise option { box-shadow: none; border: 0 none; outline: none; margin-left: 18px; font-family: "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", Arial, Helvetica, sans-serif; } #search-wrap .search-btn { border: 0px; float: right; /* margin: 4px 4px 4px 0; */ width: 66px; outline: none; height: 36px; border-radius: 0px 18px 18px 0px; background-color: #49AF4F; color: #FFF; text-align: center; line-height: 28px; } </style>
我还在纠结怎么给那个按钮给一个搜索的图标........
欢迎加群讨论技术,群:677373950(满了,可以加,但通过不了),2群:656732739
评价