我正在开发我的网站,它很棒,但突然间它停止工作,我无法使用margins
或其他任何东西进行开发过程:(
停止工作我的意思是:"按钮不能在我的导航中工作 - 我尝试在css中为初始页面封面下面的部分添加边距"
这是我网站的代码:
编辑:它适用于JS Fiddle但不适用于我的网站!知道为什么吗? :(HTML:
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="description" content="" />
<meta name="author" content="Ryan Shah" />
<title>Space Bucket | Home</title>
<link rel="stylesheet" href="css/style.css" />
<link rel="shortcut icon" href="img/favicon.png">
</head>
<body>
<div class="container">
<div class="introduction">
<div class="introductory-message">
<h1>Space Bucket</h1>
<hr />
<h3>An amateur game studio</h3>
</div>
</div>
<div class="navigation-section">
<ul class="nav-horizontal">
<li><a href="index.php">Home</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Resume</a></li>
<li><a href="#">My Work</a></li>
<li><a href="#">Contact</a></li>
</ul>
</div>
<div class="section">
<h1>Who are we?</h1>
<hr />
<blockquote>
About us information goes here
</blockquote>
</div>
</div>
<script src="js/jquery.js"></script>
<script src="js/site.js"></script>
</body>
</html>
CSS:
@import url("bootstrap-grids.min.css");
@font-face {
font-family: 'Source Sans Pro';
src: url('../font/SourceSansPro-Regular.ttf');
}
@font-face {
font-family: 'Play';
src: url('../font/Play-Regular.ttf');
}
body, html {
height: 100%;
width: 100%;
background-image: url(../img/bg.jpg);
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-shadow: 1px 1px 1px rgba(0,0,0,0.004);
text-rendering: optimizeLegibility !important;
}
body, h1, h2, h3, h4, h5, h6, p, div {
font-family: 'Play', sans-serif;
}
.container {
min-height: 100%;
height: auto !important;
height: 100%;
width: 100%;
margin: 0;
padding: 0;
}
.introduction {
padding: 0;
margin: 0;
width: 100%;
height: 100%;
color: #f8f8f8;
background: url(../img/bg.png) no-repeat center center;
background-size: cover;
text-align: center;
}
.introductory-message {
position: relative;
padding-top: 20%;
padding-bottom: 20%;
}
.introductory-message > h1 {
margin: 0;
font-size: 5em;
text-shadow: 2px 2px 3px rgba(0, 0, 0, 0.6);
font-family: 'Play', sans-serif;
}
.introductory-message > hr {
width: 10%;
border-top: 5px double #a69257;
}
.introductory-message > h3 {
font-family: 'Play', sans-serif;
text-transform: uppercase;
text-shadow: 2px 2px 3px rgba(0, 0, 0, 0.6);
}
.navigation-section {
background-color: #020202;
padding: 20px;
border-top: 2px solid rgba(10, 10, 10, 0.6);
border-bottom: 2px solid #333;
}
ul.nav-horizontal {
list-style: none;
margin: 0;
padding: 0;
text-align: center;
vertical-align: middle;
}
ul.nav-horizontal li {
display: inline;
}
ul.nav-horizontal a {
display: inline-block;
padding: 6px;
padding-left: 10px;
padding-right: 10px;
width: 100px;
margin-left: 20px;
margin-right: 20px;
color: #a69257;
text-transform: uppercase;
text-decoration: none;
border: 2px double #ceb15a;
cursor: pointer;
}
ul.nav-horizontal a:hover {
color: #ceb15a;
border: 2px double #a69257;
}
.section {
background-color: #dee6ec;
padding: 10px;
text-align: center;
}
.section > h1 {
margin: 0;
margin-top: 20px;
font-size: 5em;
color: #333;
text-transform: uppercase;
font-family: 'Play', sans-serif;
text-align: center;
}
.section > hr {
width: 10%;
border-top: 5px double #111;
}
.section > blockquote {
width: 50%;
border-left: 4px solid #333;
border-right: 4px solid #333;
}
答案 0 :(得分:0)
显然根据W3 ......
我文档中的这一行:
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
编写HTML代码时“不可接受”
感谢所有的帮助!