清晨投递 2021-04-30 16:13 采纳率: 100%
浏览 104
已采纳

为什么加了posttion:fixed;之后,文字都堆叠在一起

<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<title>百度一下,你就知道</title>
		<link rel="stylesheet" type="text/css" href="css/style.css" />
	</head>
	<body>
		<nav>
			<span class="nav">
				<a href="#">新闻</a>
				<a href="#">hao123</a>
				<a href="#">地图</a>
				<a href="#">直播</a>
				<a href="#">视频</a>
				<a href="#">贴吧</a>
				<a href="#">学术</a>
				<a href="#">更多</a>
			</span>
				<a href="#"id="anniu">登录</a>
				<a href="#" >设置</a>
		</nav>
		<div align="center" class="box" style="margin-top:170px;">
			<div>
				<img src="img/logo.png">
			</div>
			<div class="box2">
				<span><input type="text" value="" class="ssk" placeholder="   请输入内容" /></span>
				<span><input type="submit" value="百度一下" class="baidu" /></span>
			</div>
		</div>
		<div class="JieWei">
			<a href="#"style="left: 20px;">设为首页</a>
			<a href="#">关于百度</a>
			<a href="#">About Baidu</a>
			<a href="#">百度营销</a>
			<a href="#">使用百度前必读</a>
			<a href="#">意见反馈</a>
			<a href="#">帮助中心</a>
			<a href="#">京公网安备</a>
			<a href="#"></a>
		</div>
	</body>
</html>
body{
	margin: 0px;
	padding: 0px;
	height: 700px;
	width: 100%;
}
span{
	display: inline-block;
}
span>input{
	margin: 0px;
	padding: 0px;
}
img{
	width: 200px;
	height: 60px;
	margin-bottom: 20px;
}
.ssk{
	width: 548px;
	height: 40px;
	border-radius: 10px 0px 0px 10px;
}
.ssk:hover{
	
}
.baidu{	
	width: 108px;
	height: 40px;
	color: white;
	background-color: #4e6ef2;
	border-radius: 0px 10px 10px 0px;
	border: none;
	font-size: 15px;
}
.baidu:hover{
	background-color: #4664db;
}
.nav>a{
	text-decoration: none;
	margin-left: 23px;
	font-size: 13px;
	color: black;
	margin-top: 20px;
	float: left;
}

.nav>a:hover{
	color: #4e6ef2;
}
nav>a{
	text-decoration: none;
	margin-right: 23px;
	font-size: 13px;
	color: black;
	margin-top: 20px;
	float: right;
}
#anniu{
	background-color: #4664DB;
	width: 45px;
	padding: 5px;
	color: white;
	text-align: center;
	border-radius: 5px;
}

.JieWei>a{
	display: inline;/*行内元素*/
	text-decoration: none;/*去除下划线*/
	text-align: center;
	font-size: 13px;
	color: grey;
	position: fixed;
	
	bottom: 10px;
	width: 100%;
}
.JieWei>a:hover/*鼠标悬停*/{
	color: black;
}

 

  • 写回答

6条回答 默认 最新

  • 关注
    .JieWei>a{
    	display: inline;/*行内元素*/
    	text-decoration: none;/*去除下划线*/
    	text-align: center;
    	font-size: 13px;
    	color: grey;
    }
    .JieWei{
    	position: fixed;
    
    	bottom: 10px;
    	width: 100%;
    }
    .JieWei>a:hover/*鼠标悬停*/{
    	color: black;
    }
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(5条)

报告相同问题?

悬赏问题

  • ¥15 乘性高斯噪声在深度学习网络中的应用
  • ¥15 运筹学排序问题中的在线排序
  • ¥15 关于docker部署flink集成hadoop的yarn,请教个问题 flink启动yarn-session.sh连不上hadoop,这个整了好几天一直不行,求帮忙看一下怎么解决
  • ¥30 求一段fortran代码用IVF编译运行的结果
  • ¥15 深度学习根据CNN网络模型,搭建BP模型并训练MNIST数据集
  • ¥15 C++ 头文件/宏冲突问题解决
  • ¥15 用comsol模拟大气湍流通过底部加热(温度不同)的腔体
  • ¥50 安卓adb backup备份子用户应用数据失败
  • ¥20 有人能用聚类分析帮我分析一下文本内容嘛
  • ¥30 python代码,帮调试,帮帮忙吧