0
header.myheader{
height: 600px;
background:url("http://imgur.com/HAst0aY")!important;
}
nav.mynavbar,a:hoover {
float:left;
display: inline-block;
margin-left: 20px;
font-weight: 200;
color:rgba(255,255,255,0.7);
font-size: 20px;
text-transform: capitalize;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<header class ="myheader">
<nav class ="mynavbar">
<a href="#" class = "homepage"> MSMAlliance Group</a>
<a href="#" class = "About" > About </a>
<a href="#" class = "Meetus">Meet Us</a>
<a href="#" class ="events"> Event </a>
<a href ="#" class = "contactus"> Contact Us</a>
<a href="" target="_blank" > Excutive Log In/Sign Up </a>
</nav>
<h1> Welcome to Morehouse School of Medience - Alliance Group </h1>
</header>
我在使用imgur我的圖像的位置,顯示我的底色圖像的麻煩。我曾嘗試添加一個類來覆蓋bootstrap,我嘗試過!重要的,但它仍然無法正常工作。有趣的是,當我只使用背景:黑色,顏色會出現,但是當我嘗試放置圖像時,它不起作用。
以下是我的代碼。 PS - 我是新手。
CSS Code:
header.myheader{
height: 600px;
background:url("http://imgur.com/HAst0aY")!important;
}
nav.mynavbar,a:hoover {
float:left;
display: inline-block;
margin-left: 20px;
font-weight: 200;
color:rgba(255,255,255,0.7);
font-size: 20px;
text-transform: capitalize;
}
html code:
<!DOCTYPE html>
<html=lang ="en-US" >
<head>
<meta charset="utf-8">
<title> MSMAlliance</title>
<!-- SEO -->
<meta name = "author" content="msmalliance">
<meta name="description" content="">
<link rel="canonical" href="">
<meta name="viewport" content=" width = device-width,inital-scale = 1.0">
<link rel ="stylesheet" href="css/bootstrap.css">
<link rel ="stylesheet" href="css/bootstrap-theme.css">
<link rel ="stylesheet" href="css/customheader.css">
<link rel = "icon" href="#" type="image/x-icon" sizes=" 16x16">
<link href="https://fonts.googleapis.com/cssfamily=Open+Sans:400,600i,700i" rel="stylesheet">
<body>
<header class ="myheader">
<nav class ="mynavbar">
<a href="#" class = "homepage"> MSMAlliance Group</a>
<a href="#" class = "About" > About </a>
<a href="#" class = "Meetus">Meet Us</a>
<a href="#" class ="events"> Event </a>
<a href ="#" class = "contactus"> Contact Us</a>
<a href="" target="_blank" > Excutive Log In/Sign Up </a>
</nav>
<h1> Welcome to Morehouse School of Medience - Alliance Group </h1>
</header>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"> </script>
<script src = "js/bootstrap.min.js"> </script>
<script src="js/bootstrap.js"> </script>
謝謝你的sooo多!!!! – Paris