所以在我的CSS中,我已经为我的文本创建了一个类,该类使文本后面显示一个清晰的白框,以使其更具可读性,我也想在登录页面中执行此操作,我想使其变为黑色屏幕中间的方框类似于Steam登录页面https://store.steampowered.com/login/,但将其放在div和class中似乎无效。
IVE尝试将div放入表格中,而iveive也尝试将表格放入div
var d = new Date();
var curr_date = d.getDate();
var curr_month = d.getMonth() + 1;
var curr_year = d.getFullYear();
var d1 = curr_date + "/" + curr_month + "/" + curr_year;
console.log(d1);
//alert(d1); change format date completed 12/04/2019
var date2 = new Date("04/12/2018");
var curr_date2 = date2.getDate();
var curr_month2 = date2.getMonth() + 1;
var curr_year2 = date2.getFullYear();
var d2 = curr_date2 + "/" + curr_month2 + "/" + curr_year2;
console.log(d2);
//alert(d2); // change format date completed 12/04/2018
console.log(d.getTime())
console.log(date2.getTime())
// only change the below
if(d.getTime() > date2.getTime()) {
console.log("aaa");
} else {
console.log("bbb");
}
</div>
<form>
<div class="acc">
Username:<br>
<input type="text" name="Username">
<br>
Password:<br>
<input type="text" name="Password">
</div>
</form>
答案 0 :(得分:0)
尝试直接或通过对输入元素应用样式来设置输入元素的样式。参见下面的有效演示:
ViewAnimator.animate(imageView).rotationBy(rotationAngle)....
body {
background-color: #252831;
color: white;
}
.container {
display: flex;
flex-direction: column;
}
form {
display: flex;
flex-direction: column;
width: 200px;
}
.input-wrap {
margin: 5px;
}
input {
background-color: #353A47;
border: 1px solid #4C4B63;
}
答案 1 :(得分:0)
尽管这与另一个答案类似,但我更改了字体颜色,以便显示,而不是在黑色背景上显示黑色文本
input {
font-family: "Times New Roman", Times, serif;
font-style: normal;
font-weight: normal;
font-size: 30px;
line-height: normal;
color: #ffffff;
margin-left: auto;
margin-right: auto;
background-color:black;
text-align:center;
vertical-align: middle;
padding:20px 47px;
}