<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>百度</title> <style type="text/css"> #middle{ position: absolute; margin-left: 35%; 30%; height: 100%; } #search{ 95%; margin-left: 0px; height: 50px; } #input{ 80%; margin-left: 0px; height: 49px; } #button{ 15%; height: 50px; color: white; background-color: blue; border: 0px; } #button:hover{ background-color: darkseagreen; } </style> </head> <body> <div id="middle"> <div id="pic" > <img src="baidu.png"/> </div> <div id="search"> <input id="input"></input> <button id="button">百度一下</button> </div> </div> </body> </html>