⽤htmlcssjs制作登录页⾯,#3使⽤html+css+js制作⽹页制作登
录⽹页
顶部距离顶部的距离。
Step3 添加圆⾓边框
我们还可以为div添加边框,将main.css中input_f的选择器改为:
`#input_f {
text-align: center;
height: 40vh;
margin: 0 auto;
margin-top: 25vh;
width: 30vw;
border: 2px solid darkslategray;
border-radius: 30px;
}`
* 1
* 2
* 3
* 4
* 5
* 6
attension* 7
* 8
* 9
其中,border为边框设置,请参考点我跳转。
Step4 添加标题
在index.html中id为um的input元素的上⾯添加:
`
Login`
* 1
其中,font-size是设置⽂字⼤⼩。
⾄此,我们可以拥有⼀个和图⽚⼀样的登录页⾯:
2.3.4 美化组件
BUTTON
默认的button按钮样式很不美观,笔者在此,引⽤mcya的博客的css样式,在main.css中添加:
`#bu {
margin-top: 5px;
width: 15vw;
}
button {
display: inline-block;
outline: none;
cursor: pointer;
text-align: center;
inputstream转json
text-decoration: none;
font: 14px/100% Arial, Helvetica, sans-serif;
padding: 5px 2px 4px;
text-shadow: 0 1px 1px rgba(0, 0, 0, .3);
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
-moz-box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
color: #d9eef7;
border: solid 1px #0076a3;
background: #0095cd;
background: -webkit-gradient(linear, left top, left bottom, from(#0095cc), to(#00678e)); background: -moz-linear-gradient(top, #00adee, #00678e);
filter: progid:adient(startColorstr='#00adee', endColorstr='#00678e'); }
button:hover {
background: #007ead;
background: -webkit-gradient(linear, left top, left bottom, from(#00678e), to(#0095cc));
background: -moz-linear-gradient(top, #00678e, #0095cc);
filter: progid:adient(startColorstr='#00678e', endColorstr='#0095cc');
}
/*结束*/`
* 1
* 2
* 3
* 4
* 5
* 6
* 7
* 8
* 9
* 10
* 11
* 12
* 13
* 14
* 15
* 16
* 17
* 18
* 19
* 20
* 21
* 22
星云cluster最新信息* 23
* 24
* 25
* 26
* 27
* 28
* 29
* 30
* 31
* 32
* 33
* 34
* 35
其中,如有属性名不熟悉,可参考点我跳转菜鸟教程,button:hover为⿏标悬浮在button的元素上时,button元素的样式,xxx{}为元素选择器,选择全部button元素。
INPUT
把main.css中除了button(刚刚上⾯给的代码)都替换成:
`#input_f {
text-align: center;
height: 40vh;
margin: 0 auto;
margin-top: 25vh;
width: 30vw;
学生个人网页制作html代码cssborder: 2px solid darkslategray;
border-radius: 30px;
background-color: rgb(170, 169, 169);
}
input {
outline-style: none;
border: 1px solid #ccc;
border-radius: 3px;
border: 0px;
width: 20vw;
height: 3vw;
margin-top: 5px;
}
#um {
margin-top: 10px;
}
input:focus {/*发光*/
border-color: #66afe9;
outline: 0;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(102, 175, 233, .6); box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(102, 175, 233, .6)
}`
* 1
* 2
* 3
* 4
* 5
* 6
* 7
* 8
* 9
* 10
* 11
* 12
* 13
* 14
* 15
* 16
* 17
es6入门* 18
* 19
* 20
* 21
* 22
* 23
* 24
幽门螺旋杆菌阳性是什么意思* 25
* 26