<form> <input type="text" placeholder="搜索..."> <button type="submit">搜索</button> </form>
form { display: flex; justify-content: center; align-items: center; margin-bottom: 20px; } input[type="text"] { width: 250px; height: 40px; padding: 10px; font-size: 18px; border: none; border-bottom: 2px solid grey; outline: none; } button[type="submit"] { background-color: #4CAF50; color: white; border: none; padding: 10px 20px; font-size: 18px; cursor: pointer; border-radius: 4px; } button[type="submit"]:hover { background-color: #3e8e41; }
ps: