我正在使用这个,可能是简单的解决方案,但我找不到有关此特定问题的stackoverflow或互联网上的任何帮助.
我有一个菜单,我希望在链接下方显示图像,或者当您将鼠标悬停在链接上时.我希望这可以在CSS中完成.到目前为止这是我的代码.
HTML
<html>
<head>
<title></title>
<link rel="stylesheet" type="text/css" href="startpage.css">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div id="wrapper">
<img id="baggrund" width="166" height="327" alt="back image" src="images/laerkeryg.jpg"/>
<img id="cirkler" width="319" height="249" alt="circles" src="images/circles.PNG"/>
<div id="header">/jacob gerlif pilegaard/</div>
<div id="underheader">portfolio</div>
<ul>
<li><a href="index.html">home</a></li>
<li><a href="about.html">about</a></li>
<li><a href="gallery.html">gallery</a></li>
<li><a href="contact.html">contact</a></li>
</ul>
</div>
<img id="menucircle" width="50" height="50" alt="menu circle" src="images/circle.PNG"/>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
到目前为止这是CSS:
a:hover
{
background-image: url('image/circle.PNG');
background-repeat: no-repeat;
}
Run Code Online (Sandbox Code Playgroud)
希望你们能帮助我!
我在一本名为"Sitepoint Full Stack Javascript with MEAN"的书中遵循了一个教程,我刚刚完成了第6章,并且应该创建一个带有"数据库"的"服务器".数据库只不过是一个JSON文档.然而,即使(我可以看到),我的代码是他的直接副本,当我尝试运行它时,我得到标题中提到的错误.这var result = data.find(function(item) {...是导致此问题的原因(位于employees.js中,位于第16行).我看不出还能做什么,希望人们能找到解决问题的方法.
我有几个不同的文件,我用它.
Index.js:
var http = require('http');
var employeeService = require('./lib/employees');
var responder = require('./lib/responseGenerator');
var staticFile = responder.staticFile('/public');
http.createServer(function(req,res) {
// a parsed url to work with in case there are parameters
var _url;
//In case the client uses lower case for methods
req.method = req.method.toUpperCase();
console.log(req.method + ' ' + req.url);
if (req.method !== 'GET') {
res.writeHead(501, {
'Content-Type': 'text/plain'
});
return res.end(req.method + ' is not …Run Code Online (Sandbox Code Playgroud)