首页 > 其他分享 >1.1 仿百度Web Day1

1.1 仿百度Web Day1

时间:2022-10-30 02:33:41浏览次数:47  
标签:Web 1.1 color text Day1 10px input height margin

Day1

根据自己的垃圾html+css水平写出了下面这个页面:

image-20221029022344214

首先, 首部的超链接都能够链接上, 但是不会[更多]的弹出窗口, 右面的天气/设置/个人也没有做, 不会怎么去调用

中间的图片和搜索栏能够正常使用, 搜索栏能够正常搜索. 但是无法水平垂直居中, 而且, 两个input无法靠近在一起.

下面的inframe新闻框不会写

最下面的footer正常使用.

源码

css

body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,button,textarea,p,blockquote,th,td { margin:0; padding:0; }
a {text-decoration: none;}

/* 顶部 */
#nav {
	margin: 20px;
}

#nav > a {
	color: black;
	margin: 10px;
}

#nav > a:hover {
	color: aqua;
}

/* 图片 */
.image1 {
	text-align: center;
}

/* 搜索栏 */
.search {
	text-align: center;
	line-height: height;
}

.search > form > input:first-child{
	border-radius: 10px;
	width: 700px;
	height: 30px;
	margin: 0;
	padding: 0;
}

.search > form > input:nth-child(2){
	background-color: blue;
	color: white;
	border-radius: 10px;
	width: 100px;
	height: 30px;
	margin: 0;
	padding: 0;
}



/* 底部 */
#footer {
	text-align: center;
	position: absolute;
	left: 0; bottom: 0; right: 0;
	margin: 10px;
}

#footer > * {
	font-size: 5px;
	color: gray;
	margin: 10px;
}

#footer > a:hover {
	color: black;
}

html

<!DOCTYPE html>
<html lang="zh">
<head>
	<meta charset="UTF-8">
	<title>百度一下,你就知道</title>

	<link rel="stylesheet" href="./css/style.css">
</head>
<body>

	<!-- 顶部导航栏 -->
	<div id="nav">
		<a href="http://news.baidu.com/" target="_blank">新闻</a>
		<a href="https://www.hao123.com/?src=from_pc_logon" target="_blank">hao123</a>
		<a href="http://map.baidu.com/" target="_blank">地图</a>
		<a href="http://tieba.baidu.com/" target="_blank">贴吧</a>
		<a href="https://haokan.baidu.com/?sfrom=baidu-top" target="_blank">视频</a>
		<a href="http://image.baidu.com/" target="_blank">图片</a>
		<a href="https://pan.baidu.com/?from=1026962h" target="_blank">网盘</a>

		<a href="#" target="_blank">更多</a>
	</div>

	<!-- 图片 -->
	<div class="image1">
		<a href="https://www.baidu.com/s?wd=%E4%BA%8C%E5%8D%81%E5%A4%A7&sa=ire_dl_gh_logo_texing&rsv_dl=igh_logo_pc" target="_blank">
			<img src="https://www.baidu.com/img/pc_675fe66eab33abff35a2669768c43d95.png" alt="百度搜索" title="二十大" style="zoom:50%">
		</a>
	</div>

	<!-- 搜索栏 -->
	<div class="search">
		<form action="https://cn.bing.com/search" method="get">
			<input type="text" name="q" >
			<input type="submit" value="百度一下">
		</form>
	</div>

	<!-- 底层栏 -->
	<div id="footer">
		<a href="https://home.baidu.com/" target="_blank">关于百度</a>
		<a href="http://ir.baidu.com/" target="_blank">About Baidu</a>
		<a href="https://www.baidu.com/duty" target="_blank">使用百度前必读</a>
		<a href="https://help.baidu.com/" target="_blank">帮助中心</a>
		<a href="https://e.baidu.com/?refer=1271" target="_blank">企业推广</a>
		<a href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=11000002000001" target="_blank">京公网安备11000002000001号</a>
		<a href="https://beian.miit.gov.cn/" target="_blank">京ICP证030173号</a>
		<a href="https://www.baidu.com/licence/" target="_blank">信息网络传播视听节目许可证 0110516</a>
		<span>互联网宗教信息服务许可证编号:京(2022)0000043</span>
	</div>

</body>
</html>

标签:Web,1.1,color,text,Day1,10px,input,height,margin
From: https://www.cnblogs.com/Yiero/p/16840389.html

相关文章

  • Java Web
    javaweb是指,所有通过java语言编写可以通过浏览器访问的程序的总称,叫javaweb。javaweb是基于请求和影响来开发的。请求是指客户端给服务器发送的数,请求叫Request。......
  • webpack 打包原理
    目录一、为什么要使用webpack?二、什么是webpack?三、webpack核心概念1、Entry2、Output3、Chunk4、Loader5、Plugins四、webpack的核心机制Loader工作原理plugin工作原理......
  • JavaScript – event loop 事件循环, 单线程, Web Worker
    前言因为要写RxJS系列,有一篇要介绍scheduler.它需要基础的JS执行机制,于是就有了这里篇. 顺带也介绍以下WebWorker呗. 参考知乎–详解JavaScript中的......
  • 快读《ASP.NET Core技术内幕与项目实战》WebApi3.1:WebApi最佳实践
    本节内容,涉及到6.1-6.6(P155-182),以WebApi说明为主。主要NuGet包:无 一、创建WebApi的最佳实践,综合了RPC和Restful两种风格的特点1//定义Person类和ErrorInfo类2pub......
  • JavaWeb-MySQL基础
    JavaWeb-MySQL基础1,数据库相关概念1.1数据库存储和管理数据的仓库,数据是有组织的进行存储。数据库英文名是DataBase,简称DB。数据库就是将数据存储在硬盘上,可......
  • HNNCTF web-Challenge__rce(自增命令执行+限制长度)
    <?phperror_reporting(0);if(isset($_GET['hint'])){highlight_file(__FILE__);}if(isset($_POST['rce'])){$rce=$_POST['rce'];if(strlen($rce......
  • Javaweb基础复习------Cookie+Session案例的实现(登录注册案例)
    Cookie对象的创建--Cookiecookie=newCookie("key","value");发送Cookie:resp.addCookie();获取Cookie数据:req.getCookie("","");Cookie不能直接存储中文需要进行转......
  • http各个版本(1/1.1/2)对比
    http各个版本(1/1.1/2)对比 目录:http1.1长连接HTTP1.1支持只发送header信息(不带任何body信息)http1.1host请求头HTTP2.0使用多路复用技术(Multiplexing)HT......
  • HTTP1、HTTP1.1、http2、http3的区别
    1.改进持久连接HTTP/1.0每进行一次HTTP通信,都需要经历建立TCP连接、传输HTTP数据和断开TCP连接三个阶段(如下图)。在当时,由于通信的文件比较小,而且每个页面的引用也不......
  • JAVAWeb - HttpServletResponse
    HttpServletResponseweb服务器接收到客户端的Http请求,针对这个请求,分别创建了一个代表请求的HttpServletRequest对象,代表响应的一个HttpServletResponse如果要获取客户端......