首页 > 其他分享 >移动web基础

移动web基础

时间:2023-02-22 18:01:43浏览次数:36  
标签:web color text contain2 基础 height width 移动 margin

<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title></title>
		<!-- <link rel="stylesheet" type="text/css" href="xxx.css"/> -->
		<style type="text/css">
			
*{
	margin: 0px;
	padding: 0px;
}
body{
	background-color: aliceblue;
	width: 1200px;
	margin: 0 auto;
}
header{
	position: relative;
	width: 1200px;
	margin: 0 auto;
	height: 80px;
}
.head_l{
	position: absolute;
	left: 25px;
	top: 6px;
}
.head_r{
	position: absolute;
	right: 25px;
	top: 6px;
	width: 60px;
}
.keyword{
	width: 200px;
	height: 20px;
	background: url(img/search.png) no-repeat;
	background-size: 15px;
	text-indent: 30px;
}
.search{
	width: 40px;
	background-color: chocolate;
	color: white;
	font-weight: bold;
}
#hnav{
	background-color: darkseagreen;
}
#head_nav{
	width: 1200px;
	margin: 10px auto;
	display: flex;
	justify-content: space-around;
}
#head_nav a{
	text-decoration: none;
	color: white;
	font-size: 1.5em;
	font-weight: bold;
	line-height: 60px;
}
#head_nav a:hover{
	color: blue;
}
#adv{
	width: 1200px;
	margin: 0px auto;
}
#adv img{
	width: 1200px;
}
#contain{
	width: 1200px;
	height: 450px;
	margin: 5px auto;
	position: relative;
}
#contain1,#contain2{
	border: solid 1px #d4d4d4;
	border-radius: 8px;
	background-color: white;
}
#contain1{
	width: 18%;
	position: absolute;
	top: 0;
	left: 0;
}
#contain2{
	width: 80%;
	position: absolute;
	top: 0;
	right: 0;
}
#contain1 h2,#contain2 h2{
	text-align: center;
	color: #697a5b;
	text-shadow: 1px 2px 1px #cfc987,-1px 2px 1px #CFC987;
	padding-top: 15px;
}
#contain1 a{
	margin: 0 auto;
	padding: 10px 0 0 0;
	display: block;
	text-align: center;
	color: #5d5d5d;
	letter-spacing: 2px;
	text-decoration: none;
	border-bottom: dotted 1px #5d5d5d;
}
#contain1 a:last-child{
	border-bottom: none;
	border-radius: 0 0 4px 4px;
	padding-bottom: 5px;
}
#contain2 ul li img{
	width: 265px;
	height: 280px;
}
#contain2 ul li{
	width: 28%;
	height: 340px;
	text-align: center;
	list-style-type: none;
}
#contain2 p{
	font-weight: bold;
}
#contain2 span{
	color: red;
	font-weight: bold;
}
#contain2 ul{
	display: flex;
	justify-content: space-around;
}
#contain2 h2{
	margin-bottom: 20px;
}
footer{
	width: 1200px;
	height: 30px;
	line-height: 30px;
	text-align: center;
	font-size: 14px;
	color: #5D5D5D;
}
		</style>
	</head>
	<body>
		<header>
			<div class="head_l">
				<label>搜索</label>
				<input type="search" class="keyword" placeholder="xxxx"/>
				<input type="submit" value="搜索" class="search">
			</div>
			<img src="img/logo.jpg" class="head_r">
		</header>
		<section id="hnav">
			<nav id="head_nav">
				<a href="#">书店主页</a>
				<a href="#">企业采购</a>
				<a href="#">小说投稿</a>
				<a href="#">客户服务</a>
				<a href="http://www.baidu.com">个人中心</a>
			</nav>
		</section>
		<section id="adv">
			<img src="img/bannar.png" >
		</section>
		<main id="contain">
			<aside id="contain1">
				<h2>搜索图书</h2>
				<a href="#">文学</a>
				<a href="#">哲学</a>
				<a href="#">历史</a>
				<a href="#">小说</a>
				<a href="#">少儿</a>
				<a href="#">教辅</a>
				<a href="#">网络</a>
				<a href="#">青春</a>
				<a href="#">科技</a>
				<a href="#">艺术</a>
				<a href="#">管理</a>
			</aside>
			<article id="contain2">
				<h2>重磅推荐</h2>
				<ul>
					<li>
						<img src="img/b_bdr.jpg" >
						<p>摆渡人<span>&yen;19.9元</span></p>
					</li>
					<li>
						<img src="img/b_byx.jpg" >
						<p>白夜行<span>&yen;25.5元</span></p>
					</li>
					<li>
						<img src="img/b_huozhe.jpg" >
						<p>活着<span>&yen;29.9元</span></p>
					</li>
				</ul>
			</article>
		</main>
		<footer>
			<hr>
			<p>网上书店 2023&reg;</p>
		</footer>
	</body>
</html>

标签:web,color,text,contain2,基础,height,width,移动,margin
From: https://www.cnblogs.com/lockeart/p/17145344.html

相关文章

  • 一文弄清楚Web应用防火墙,以及作用是什么?
    如今,基于Web环境的互联网应用越来越广泛,企业信息化过程中各种应用都架设在Web平台上,Web应用系统已深入客户所在的各个行业,成为重要的IT资产,而传统网络层的防护已经无法保障......
  • golang WEB框架Hertz --- 获取参数
    安装Hertz命令行工具请确保您的Go版本在1.15及以上版本,笔者用的版本是1.18配置好GO的环境后,按照Hertz的命名行工具goinstallgithub.com/cloudwego/hertz/cmd/hz@lates......
  • Vue3从基础到精通
    目录一、Vue3介绍1.Vue3的变化2.Vue2和Vue3的不同之处二、Vue3创建项目1.用vue-lci创建步骤2.用vite创建步骤三、setup函数四、ref、reactive、toRefs五、计算属性和监听......
  • E029Web学习笔记-Maven基础
    一、Maven概述1、简介Maven是一个非常强大的项目管理和综合工具; 2、Maven依赖管理Maven将Java项目所需要的Jar包放在一个统一的仓库里面,多个项目可以共同使用; 3、项目的一......
  • E028Web学习笔记-Redis
    一、概述1、简介Redis是完全开源免费的,遵守BSD协议,是一个高性能的NOSQL系列的非关系型key-value数据库;数据存储在内存中的数据库; 2、关系型数据库与非关系型数据库关系型......
  • 测试基础相关的面试题
    1、作为测试人员,你有完成过哪些工件的输出?---答:有测试用例、测试报告、测试用例执行结果、缺陷明细这些交付件。 2、测试报告有哪些内容?答:大概有项目背景、测试范围......
  • 详解神经网络基础部件BN层
    摘要:在深度神经网络训练的过程中,由于网络中参数变化而引起网络中间层数据分布发生变化的这一过程被称为内部协变量偏移(InternalCovariateShift),而BN可以解决这个问题。......
  • Python 100道基础入门练习题(附答案)
    实例001:数字组合题目有四个数字:1、2、3、4,能组成多少个互不相同且无重复数字的三位数?各是多少?程序分析遍历全部可能,把有重复的剃掉。1num=02forainrange(1,5):3......
  • Qt QGraphicsView移动、缩放
    首先需要明白,view在整个视图框架中的角色是用于显示scene的,所以决定了如何展示scene,包括scale()函数,用于放大缩小所展示的scene;centerOn()函数,决定scene的中心在何方。所有......
  • E002Web学习笔记-CSS
    目录一、CSS概述1、CSS的作用2、什么是CSS3、CSS控制样式的好处4、CSS的使用方式①内联样式(不推荐使用)——作用于当前标签②内部样式——作用于当前html文件③外......