<!DOCTYPE html>
<html lang="en"><head>
<meta charset="UTF-8">
<title>Document</title>
<style type="text/css">
*{
margin: 0;
padding: 0;
}
#img{/*背景图*/
background-image: url(1.jpeg);
}
.log{/*文本框*/
width: 300px;
height: 40px;
margin: 15px 10px 10px 10px;/*上 右 下 左,两个文本框的边距*/
text-indent: 10px;
}
.box{/*盒子*/
width: 399px;
height: 279px;
border-radius: 4px;
border: 5px solid green;
border-color: transparent;
padding: 25px;
margin: 25px;
position: absolute;
left: 780px;
top: 150px;
background-color: white;
}
.butt{/*登录按钮*/
width: 300px;
height: 50px;
margin: 10px 10px 10px 10px;
background-color: rgba(134,206,47,1.00);
}
a:hover{
position: absolute;
left: 368px;
top: 295px;
font-size: 15px;
text-decoration:none; /*鼠标放上去有下划线*/
}
</style>
</head>
<body id="img">
<div>
<div class="text" style="text-align: center">
<h1>欢迎你的到来</h1>
<div>
<p>登录</p><hr>
</div>
<div class="box">
<form action="" method="post">
<input type="text" name="ID" placeholder="学号" class="log"><br>
<input type="text" name="name" placeholder=" 姓名" class="log"><br>
<input type="submit" value="登录" class="butt">
<a href="#">意见反馈</a>
<a href="#" style="left: 293px;top: 295px">注册账号</a>
<a href="#" style="left: 218px;top: 295px">忘记密码</a>
</form>
</div>
</div>
</div>
</body>
</html>
为什么我的<a>内容不对齐
- 写回答
- 好问题 0 提建议
- 追加酬金
- 关注问题
- 邀请回答
-
2条回答 默认 最新
- threenewbee 2019-07-28 22:06关注
因为你是居中对齐,加上换行,否则和登录挤一起了。
<br /> <a href="#">意见反馈</a> <br /> <a href="#" style="left: 293px;top: 295px">注册账号</a> <br /> <a href="#" style="left: 218px;top: 295px">忘记密码</a>
本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报
悬赏问题
- ¥15 求解O-S方程的特征值问题给出边界层布拉休斯平行流的中性曲线
- ¥15 谁有desed数据集呀
- ¥20 手写数字识别运行c仿真时,程序报错错误代码sim211-100
- ¥15 关于#hadoop#的问题
- ¥15 (标签-Python|关键词-socket)
- ¥15 keil里为什么main.c定义的函数在it.c调用不了
- ¥50 切换TabTip键盘的输入法
- ¥15 可否在不同线程中调用封装数据库操作的类
- ¥15 微带串馈天线阵列每个阵元宽度计算
- ¥15 keil的map文件中Image component sizes各项意思