添加背景时,悬停和活动不起作用

时间:2016-02-11 21:07:33

标签: html css

我是html和css的新手,如果有人愿意帮我一把,我会很感激。感谢您提前为所有人提供的。

发生了一件奇怪的事情,因为我添加了背景,我无法弄清楚为什么我的悬停和活动被禁用。

HTML

<!doctype html>
<html>
<head>  
<meta charset="utf-8">
<title>Project1</title>
<link href="cssprojectgallery.css" rel="stylesheet" type="text/css">
<div class="logo" >
<img src="../MT portfolio/lg.png" alt="" width="180" height="178"        class="logo"/>
</div>
</head>

<body>
<nav>
<a href="home.html"><li><a< href".html">Home</li></a></a>
<a href="projects.html"><li><a< href"projects.html">Projects</li></a></a>
<a href="About.html"><li><a< href"about.html">About</li></a></a>
<a href="Contact.html"><li><a< href"contact.html">Contact</li></a></a>
</nav>

<div class="gal">

<img src="LOGOS/Ampire.jpg" width="800"  alt=""/>
<img src="LOGOS/Pacakama.jpg" alt="" width="800"/>
<img src="LOGOS/Zoom.jpg" alt="" width="800"/>
<img src="LOGOS/Futura.jpg" alt=""width="800""/>
<img src="LOGOS/Soundgrounded.jpg" alt=""width="800""/>
<img src="LOGOS/Gams.jpg" alt=""width="800""/> 
<img src="LOGOS/Bullseye.jpg" alt=""width="800""/> 
<img src="LOGOS/Union.jpg" alt=""width="800""/> 
<img src="LOGOS/Skylinq.jpg" alt=""width="800""/> 

</div>
</body>
</html>

CSS

@charset "utf-8";




.logo {
padding-bottom: 30px;
text-align: center;
}

nav {
font-family: "Proxima Nova ScOsf ExCn Rg";
text-align: center;
font-size: 35px;
word-spacing: 80px;
padding-right: 50px;
padding-bottom: 2%;
padding-left: 50px;
color: #000000; }

li {
display: inline;
color: #000000;
}
a {
text-decoration: none;
color: black;
}

a:hover {
color: lightgray;
}
a:active {
color: black;
}
body {
background-image: url(../mt/back.jpg);
background-sizce: cover;
}

.gal {
text-align: center;
background-color: #000000;
background-size: 0% auto;
margin-top: 0.5%;
padding-top: 2%;
padding-bottom: 0.5%;
border-top-left-radius: 0px;
margin-right: 20%;
margin-left: 20%;
margin-bottom: 5%;
}
.gal img {
vertical-align: middle;
padding-top: 1%;
padding-bottom: 2%;       
}   

1 个答案:

答案 0 :(得分:0)

您的标记无效,这就是悬停和活动状态没有响应的原因。请更正您的HTML代码,如下所示。

Order.create_with_charge(:cash, params)