css - 如何把让button的提示文字显示出来?
本文介绍了css - 如何把让button的提示文字显示出来?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
问 题
要怎么做才能显示登录?
这是CSS代码:
body{
margin: 0;
padding: 0;
font-family: "Microsoft YaHei","helvetica";
}
#All{
margin: 0;
padding: 0;
}
#Header{
background-color:rgb(61,105,192);
width: 1920px;
height: 100px;
margin: 0;
padding: 0px;
display: block;
}
#Login{
background:url("../images/slide2.jpg");
width: 1920px;
height: 427px;
}
#Login-input-box1{
width: 300px;
height: 45px;
padding-top: 135px;
margin-left: auto;
margin-right: auto;
}
#Login-input-box1 input{
width: 300px;
height: 45px;
border-radius:10px;
font-size: 18px;
background:rgba(0, 0, 0, 0);
border-color: rgb(229,247,250);
}
#Login-input-box2{
width: 300px;
margin-top: 25px;
margin-left: auto;
margin-right: auto;
}
#Login-input-box2 input{
width: 300px;
height: 45px;
border-radius:10px;
font-size: 18px;
background:rgba(0, 0, 0, 0);
border-color: rgb(229,247,250);
}
#Login-button-box{
width: 150px;
margin-top: 30px;
margin-left: auto;
margin-right: auto;
}
#Login-button-box button{
width: 150px;
height: 45px;
border-radius:10px;
font-size: 26px;
background:rgba(0, 0, 0, 0);
border-color:rgb(229,247,250);
}
解决方案
<button>登录</button>
#Login-button-box button
给这个选择器加个颜色试试,默认的字体颜色可能是黑色:
#Login-button-box button{
width: 150px;
height: 45px;
border-radius:10px;
font-size: 26px;
background:rgba(0, 0, 0, 0);
border-color:rgb(229,247,250);
color: red; // 加个红色试试
}
这篇关于css - 如何把让button的提示文字显示出来?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文