【CSS】搜索组合框样式 思否问题
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <base target="_blank" /> <title>三十客 - 搜索组合框样式 思否问题</title> <style> .search-bar { width:600px; border: 2px solid #dd182b; height: 38px; } .search-bar input,.search-bar button { border: 0px; padding: 10px; float: left; } .search-bar input { width: 80%; box-sizing:border-box; } .search-bar button { width: 20%; background: #dd182b; color: #fff; height: 38px; } </style> </head> <body> <div class="search-bar"> <input type="text" name="" value=""> <button type="button" name="button">搜索</button> </div> <h2><a href="https://segmentfault.com/q/1010000016022135">搜索框css问题</a></h2> </body> </html>