我正在网站上工作,但陷入僵局:在导航栏中创建的链接不会将用户重定向到网站上的其他页面。

here所示,我正在使用一个简单的导航栏,并找到了at gmarwaha.com的技术。我尽力按照说明进行操作,但似乎错过了一个步骤-不幸的是,我无法弄清楚该步骤是什么!

CSS与网站上的内容有些不同,但是无论如何它仍然来自那里。可以在下面看到:

.lavaLampBottomStyle {
    position: relative;
    height: 29px;
    width: 342px;
    background-color: white;
    padding: 15px;
    margin: 10px 0;
    overflow: hidden;
    border: 1px solid gray;
    margin-left: auto;
    margin-right: auto; }
        .lavaLampBottomStyle li {
            float: left;
            list-style: none;
        }
            .lavaLampBottomStyle li.back {
                border-bottom: 5px solid blue;
                width: 9px;
                height: 30px;
                z-index: 8;
                position: absolute;
            }
            .lavaLampBottomStyle li a {
                font: bold 14px arial;
                text-decoration: none;
                color: #000;
                outline: none;
                text-align: center;
                top: 7px;
                text-transform: uppercase;
                letter-spacing: 0;
                z-index: 10;
                display: block;
                float: left;
                height: 30px;
                position: relative;
                overflow: hidden;
                margin: auto 10px;
            }
                .lavaLampBottomStyle li a:hover, .lavaLampBottomStyle li a:active, .lavaLampBottomStyle li a:visited {
                    border: none;
                }


放在文档head中的JavaScript也非常重要:

$(function() {
$("#1, #2, #3").lavaLamp({
fx: "backout",
speed: 700,
click: function(event, menuItem) {
return false;
}
});
});


如果有人能够帮助我找到此错误,我将非常感谢。

最佳答案

从示例代码中很难看出来,但是单击一次返回false将阻止该操作。

08-18 22:55
查看更多