戴夫特 2021-06-24 19:11 采纳率: 50%
浏览 27

html层的css样式不能用,但是给层内的 标签设置的就能显示

html层的css样式不能用,但是给层内的 标签设置的就能显示

软件:sublime text 4

页面展示:

foot层没有样式

foot p 样式可以出来

<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>注册</title>
	<link rel="stylesheet" type="text/css" href="css/register.css">
</head>
<body>
	
	<div class="all">

		<div class="logo">
			<img src="images/logo.png" height="100" width="100">
			<div class="logo_right">
				<a href="name">首页</a>|
				<a href="name">联系我们</a>
			</div><!--right-end-->
		</div><!--logo-end-->
		<div class="nav">
			<ul>
				<li><a href="index.html">首页</a></li>
				<li><a href="name">测试</a></li>
				<li><a href="name">测试</a></li>
				<li><a href="name">测试</a></li>
				<li><a href="name">测试</a></li>
			</ul>
		</div><!--nav-end-->
		<div class="main">
			
			<form action="">
				<div class="register">
					账户:<input type="text" name="user" id="">
					密码:<input type="password" name="password" id="">
					重复密码:<input type="password" name="repasswordr" id="">
					<input type="submit" value="注册">
				</div>
		</form>
			
		</div><!--main-end-->

		<div class="foot">
			<p>作者:deft</p>
			<p>&copy;联系方式:xxxxxx</p>
		</div>
	</div>

</body>
</html>
*{
padding:0;
margin: 0;
list-style: none;
font-size: 16px;

}
.logo .main .footer{
	clear: both;

}
.all{
	width:1200px ;
	height:1920px ;
	margin: 0 auto;
}
.logo{
	
}
.logo_right{
	float: right;
	width: 200px;
	color: red;
}
.nav{
	width: 1200px;
	height: 45px;
	margin: 0 auto;
	background-color: #ccc;
}
.nav li{
	float: left;
	width: 240px;
	height: 45px;
	line-height: 45px;
	text-align: center;
}
.nav li a{
	color: #000;
	font-weight: bolder;
}
.main{
	width: 1100px;
	height: 500px;

}


.register{
			width: 350px;
			height: 200px;
			background: rgba(255, 255, 255, 0.6);
			position: absolute;
      		left:750px;
      		top:300px;
		}

.register input{
      width: 320px;
      height: 35px;
      margin:10px;
     }

 .register input[type='button']{
      width: 37px;
    }


    }
.foot{

	margin-left: 460px;
	width: 1200px;
	height: 40px;

}
.foot p{
	width: 200px; 
	text-align: center;
}
  • 写回答

1条回答 默认 最新

  • 关注

     .register input[type='button']{
          width: 37px;
        }
     
        }        《------多了个}, 去掉}即可
    .foot{
        margin-left: 460px;
        width: 1200px;
        height: 40px;
    }
     

    评论

报告相同问题?

悬赏问题

  • ¥15 找一个QT页面+目标识别(行人检测)的开源项目
  • ¥15 有没有整苹果智能分拣线上图像数据
  • ¥20 有没有人会这个东西的
  • ¥15 cfx考虑调整“enforce system memory limit”参数的设置
  • ¥30 航迹分离,航迹增强,误差分析
  • ¥15 Chrome Manifest扩展引用Ajax-hook库拦截请求失败
  • ¥15 用Ros中的Topic通讯方式控制小乌龟的速度,走矩形;编写订阅器代码
  • ¥15 LLM accuracy检测
  • ¥15 pycharm添加远程解释器报错
  • ¥15 如何让子窗口鼠标滚动独立,不要传递消息给主窗口