我想更改登录页面的背景色,但是当我尝试更改此代码时没有任何改变
body{
background:#f1f9f9;
}
它总是显示出海军色。怎么了我试图在完整的style.css文件中更改所有代码颜色,但是对于所有颜色包含仍然没有任何更改。 这是style.css
@charset "utf-8";
/* CSS Document */
body{
background:#f1f9f9;
}
.form-signin {
max-width: 500px;
margin: 0 auto;
}
.form-signin h2, .office h2 {
color: #fff;
margin-top:18px;
margin-bottom:45px;
line-height: 10px;
font-size: 60px;
text-shadow: 0 1px 0 #ccc,0 2px 0 #c9c9c9,0 3px 0 #bbb,0 4px 0 #b9b9b9,0 5px 0 #aaa,0 6px 1px rgba(0,0,0,.1),0 0 5px rgba(0,0,0,.1),0 1px 3px rgba(0,0,0,.3),0 3px 5px rgba(0,0,0,.2),0 5px 10px rgba(0,0,0,.25),0 10px 10px rgba(0,0,0,.2),0 20px 20px rgba(0,0,0,.15)
}
.form-signin .form-signin-heading{
color:#00A2D1;
}
.form-signin input[type="text"],
.form-signin input[type="password"],
font-size: 16px;
height: 45px;
background-color: #f1f9f9;
padding: 7px 9px;
}
.signin-form
{
margin-top:110px;
}
.body-container
{
margin-top:70px;
}
body.special-page{
background: url("../img/special-page-bg.png") no-repeat scroll top center #2b3237;
}
.navbar-brand{
font-family:"Lucida Handwriting";
}
#btn-submit{
height:45px;
}
/* Sticky footer styles
-------------------------------------------------- */
.footer {
padding: 40px 0;
color: #999;
text-align: center;
border-top: 1px solid #e5e5e5;
}
.footer p:last-child {
margin-bottom: 0;
}
这是关于CSS的登录页面代码(index.php)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Portal Bimbingan TA Polmed</title>
<link href="assets/css/bootstrap.min.css" rel="stylesheet">
<link href="assets/css/font-awesome.css" rel="stylesheet">
<link href="assets/css/style.css" rel="stylesheet" type="text/css">
<link rel="shoutcut icon" href="logo.png">
</head>
<body class="special-page">
<div class="signin-form">
<div class="container">
..............
非常希望您的帮助。我不喜欢看到海军颜色,因为我的大学默认颜色是紫色(我制作了一个大学网站)。我看到它很奇怪。预先感谢
答案 0 :(得分:1)
您确实更改了身体背景颜色,但是您在背景上设置了此类并为其设置了样式:
body.special-page{
background: url("../img/special-page-bg.png") no-repeat scroll top center #2b3237;
}
尝试这个:
body.special-page{
background: f1f9f9;
}