我的网站功能齐全,除了简单的事实,我无法点击聊天框或使用它,即使它是首页的主要内容。我认为可以肯定地说,我放在那里的任何其他内容都不会被点击[youtube video等..]。
这是网站HTML,我会在页面底部链接CSS:
<!doctype html>
<html>
<link href="https://fonts.googleapis.com/css?family=Geo" rel="stylesheet">
<head>
<meta charset="utf-8">
<title>Sleeperz.us</title>
<link rel="stylesheet" type="text/css" href="http://sleeperz.us/css/main.css">
</head>
<div align="center">
<div class="contentContainer">
<div style="width": 1000px; word-wrap: break-word; margin: auto; style="color": #000; style="align": center;><a href="http://www.sleeperz.us/index.html"><img src="http://sleeperz.us/imgs/sleeperz-wide.png" width="auto" height="auto"></a>
<div align="center">
<ul>
<li><a href="http://www.sleeperz.us/index.html">Home</a></li>
<li><a href="http://www.sleeperz.us/data.html">DATA</a></li>
<li><a href="http://www.sleeperz.us/about.html">About</a></li>
<div class="dropdown">
<li class="dropbtn"><li><a href="http://www.sleeperz.us/projects.html">Projects</a></li>
<div class="dropdown-content">
<a href="http://www.sleeperz.us/nightcore-creator.html">NIGHTCORE Creator</a>
<a href="http://www.sleeperz.us/artwork.html">Artwork</a>
<a href="http://blog.sleeperz.us">My Blog</a>
</div>
</div>
</ul> </div>
<p align="center" style="text-align: center; font-family: arial; font-color: #efefef; style="width: 960px;"><p font color="#efefef"><font color="#ff0000">
<p align="left"><font color="#E2E2D8"><font face="Yu Gothic">
<script type="text/javascript" src="//www3.smartchatbox.com/shoutbox/start.php?key=831990491"></script>
<footer><div class="footer">
<p align="center"> </p>
<p align="center"><p font size="8px"><p font face="Yu Gothic"><font color="#efefef">2017 www.sleeperz.us (c)</p>
<p align="center"> </p>
</footer></div></p>
<link rel="shortcut icon" href="http://sleeperz.us/imgs/favicon.ico"/>
</body>
</html>
答案 0 :(得分:0)
首先,您缺少开始标记<body>
和强>
<div style="width": 1000px; word-wrap: break-word; margin: auto; style="color": #000; style="align": center;>
必须像
<div style="width: 1000px; word-wrap: break-word; margin: auto; color: #000;" align= "center">
并阅读有关如何使用字体标记属性 here 的信息。你使用的方式是错误的。
答案 1 :(得分:0)
如何使我的网页主要内容可点击/可访问?
编写有效的HTML,并且不要用不可见的元素覆盖整个窗口。
你有一个覆盖整个窗口的无序列表。这个标记非常糟糕,需要完全重写。
ul {
list-style-type: none;
margin: 0px;
padding: 15px;
overflow: hidden;
background-color: transparent;
position: absolute;
top: -10px;
width: 960px;
height: 100%;
font-size: 19px;
font-family: Geo;
}
除了这个特定问题之外,align: center
之类的内容在HTML5中无效。
答案 2 :(得分:0)
HTML中存在很多错误。几个div有两个样式标签,身体标签也丢失了。
主要的是你的UL高度为100%。删除它以及上述修复程序将给出以下结果。
body {
margin: -50px auto;
font-family: "Yu Gothic", sans-serif;
background-color: #000000;
background-image: url(http://sleeperz.us/backgrounds/wallpaper.png);
background-repeat: no-repeat;
background-attachment: fixed;
background-position: center;
background-size: cover;
text-align: left;
font-size:12px;
}
ul {
list-style-type: none;
margin: 0px;
padding: 15px;
overflow: hidden;
background-color: transparent;
position: absolute;
top: -10px;
width: 960px;
/*height: 100%;*/
font-size:19px;
font-family: Geo;
}
li {
text-align: center;
color: #e7010b;
background-color: transparent;
}
li a {
float: left;
display: block;
padding: 20px;
color: #F2F2F2;
transition: .5s;
text-decoration: none;
background-color: transparent;
}
a:visited {
text-decoration: none;
background-color: transparent;
}
a:hover {
text-decoration: none;
color: #e7010b;
background-color: transparent;
}
a:active {
text-decoration: none;
transition: .4s;
}
.dropbtn {
background-color: transparent;
color: #efefef;
padding: auto;
font-size: 12px;
border: none;
cursor: pointer;
}
/* The container <div> - needed to position the dropdown content */
.dropdown {
float: left;
display: relative;
}
/* Dropdown Content (Hidden by Default) */
.dropdown-content {
display: none;
position: fixed;
background-color: #f9f9f9;
min-width: 260px;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
top: 65px;
z-index: 1;
}
/* Links inside the dropdown */
.dropdown-content a {
color: #000;
padding: 8px 10px;
text-decoration: none;
display: block;
}
.dropdown-content a:hover {
transition: .4s;
background-color: #f1f1f1;
}
.dropdown:hover .dropdown-content {
display: block;
}
.dropdown:hover .dropbtn {
background-color: transparent;
}
.main {
align: center;
padding: auto;
margin-top: auto;
height: auto; /* Used in this example to enable scrolling */
text-align: center;
background-position: center;
}
.contentContainer {
width:1000px;
height: 1100px auto;
background-color: rgba(0, 0, 0, 0.91);
background-position: center;
min-height: calc(120% - 300px);
margin: 0px;
}
footer {
bottom: 0px;
height: 150px;
left: 0;
position: relative;
width: 100%;
}
#background_cycler{padding:0;margin:0;width:100%;position:absolute;top:0;left:0;z-index:-1}
#background_cycler img{position:absolute;left:0;top:0;width:100%;z-index:1}
#background_cycler img.active{z-index:3}
&#13;
<!doctype html>
<html>
<link href="https://fonts.googleapis.com/css?family=Geo" rel="stylesheet">
<head>
<meta charset="utf-8">
<title>Sleeperz.us</title>
</head>
<div align="center">
<div class="contentContainer">
<div style="width: 1000px; word-wrap: break-word; margin: auto;color: #000;"><a href="http://www.sleeperz.us/index.html"><img src="http://sleeperz.us/imgs/sleeperz-wide.png" width="auto" height="auto"></a>
<div align="center">
<ul>
<li><a href="http://www.sleeperz.us/index.html">Home</a></li>
<li><a href="http://www.sleeperz.us/data.html">DATA</a></li>
<li><a href="http://www.sleeperz.us/about.html">About</a></li>
<div class="dropdown">
<li class="dropbtn"><li><a href="http://www.sleeperz.us/projects.html">Projects</a></li>
<div class="dropdown-content">
<a href="http://www.sleeperz.us/nightcore-creator.html">NIGHTCORE Creator</a>
<a href="http://www.sleeperz.us/artwork.html">Artwork</a>
<a href="http://blog.sleeperz.us">My Blog</a>
</div>
</div>
</ul> </div>
<p align="center" style="text-align: center; font-family: arial; font-color: #efefef;width: 960px;"><p font color="#efefef"><font color="#ff0000">
<p align="left"><font color="#E2E2D8"><font face="Yu Gothic">
<script type="text/javascript" src="//www3.smartchatbox.com/shoutbox/start.php?key=831990491"></script>
<footer><div class="footer">
<p align="center"> </p>
<p align="center"><p font size="8px"><p font face="Yu Gothic"><font color="#efefef">2017 www.sleeperz.us (c)</p>
<p align="center"> </p></div>
</footer></p>
<link rel="shortcut icon" href="http://sleeperz.us/imgs/favicon.ico"/>
</body>
</html>
&#13;
请告诉我这是否适合您。