模仿google官网首页写html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Google</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: #f2f2f2;
}
.container {
margin: 0 auto;
max-width: 800px;
text-align: center;
}
.logo {
margin-top: 50px;
margin-bottom: 50px;
}
.search-box {
width: 100%;
max-width: 600px;
margin: 0 auto;
position: relative;
}
.search-box input[type="text"] {
width: 100%;
height: 40px;
padding: 10px;
font-size: 16px;
border: none;
border-radius: 20px;
box-shadow: 0 2px 6px rgba(0,0,0,0.1);
outline: none;
}
.search-box input[type="submit"] {
position: absolute;
top: 0;
right: 0;
height: 40px;
width: 40px;
background-color: #f2f2f2;
border: none;
border-radius: 20px;
cursor: pointer;
box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.search-box input[type="submit"]:hover {
background-color: #e6e6e6;
}
.buttons {
margin-top: 30px;
}
.buttons a {
display: inline-block;
margin: 10px;
padding: 10px 20px;
background-color: #f2f2f2;
border: none;
border-radius: 20px;
box-shadow: 0 2px 6px rgba(0,0,0,0.1);
color: #333;
font-size: 16px;
text-decoration: none;
cursor: pointer;
}
.buttons a:hover {
background-color: #e6e6e6;
}
.language {
margin-top: 30px;
font-size: 14px;
color: #666;
}
</style>
</head>
<body>
<div class="container">
<a href="#"><img src="upload://3joAHxbsdOJCtJX2YOjE5SCygvL.png" alt="Google" class="logo"></a>
<div class="search-box">
<form action="#">
<input type="text" placeholder="Search">
<input type="submit" value="Search">
</form>
</div>
<div class="buttons">
<a href="#">Google Search</a>
<a href="#">I'm Feeling Lucky</a>
</div>
<div class="language">Google offered in: <a href="#">中文(简体)</a> <a href="#">English</a></div>
</div>
</body>
</html>
原文地址: https://www.cveoy.top/t/topic/gML 著作权归作者所有。请勿转载和采集!