谁能帮助我修改CSS代码以完成图1到图2的效果,我想将一个文本框设置为图2的样式,我应该如何修改CSS代码。以下是CSS和HTML代码。
.username{
margin-top: 10px;
width: 280px;
height:48px;
background-color: green;
}
.blanline{
width: 280px;
height:23px;
background-color: #F0FFFF;
}
.password{
width: 280px;
height:48px;
background-color: green;
}
div input,button{
width: 100%;
height: 100%;
font-size: 25px;
}
<div class="username">
<input type="text" id="username" name="username">
</div>
<div class="blanline"></div>
<div class="password">
<input type="password" id="password" name="password">
</div>
谁能帮助我,我将为您感恩。
您应该placeholder
在input
标记中添加一个。
<input type="text" id="username" name="username" placeholder="text here">
<input type="password" id="password" name="password" placeholder="text here>
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句