css下拉菜单悬停1秒延迟

时间:2015-12-09 17:50:51

标签: html css drop-down-menu

我有一个非常大的菜单下拉菜单,当它试图获取内容并且大型菜单打开覆盖屏幕的大部分时,它只是从滚动打开而变得有点恼火。有没有办法1秒。当你将鼠标悬停在它上面时菜单中的css会延迟吗?

这是网站http://www.brokenarrowwear.com/

    button, .button {
    padding: 0.7rem 1.345rem 1.0625rem; /*move menu text height*/
    font-size: 1.5rem;
}
.button-group > li > button, .button-group > li .button {
    height: 44px; /*move menu background height */
    margin-top: -10px;
}
.button-group > li {
    height: 30px;
    border-left: 1px solid #899299;
}
.button-group {
    width: 104%;
    letter-spacing: .014em;
}
.button-group .button {
    font-family: 'Pathway Gothic One', sans-serif;
    color: black;
    background-color: ;
    text-transform: uppercase;
}
.buttonleft {
    border-left: 0 !important;
}
.button-group .button:hover {
    background: white;
    box-shadow: 0px 0px 5px 4px rgba(0, 0, 0, 0.08);
}

/*Strip the ul of padding and list styling*/
.menu ul {
    list-style-type:none;
    padding:0;
    position: absolute;
}

/*Style for menu links*/
.menu li a {
    /*display:block;*/
    text-align: center;
    text-decoration: none;
    color: transparent;
}

/*Hover state for top level links*/
.menu li:hover .button {
    background: white;
    color: #828282; /* hover on menu links */
}

.menu li:hover {
    box-shadow: 0px 0px 5px 4px rgba(0, 0, 0, 0.08);
}
/*Style for dropdown links*/
.menu li:hover ul .button {
    background: white;
    color: #161616;
    height: 40px;
    line-height: 40px;
}

/*Hover state for dropdown links*/
.menu li:hover ul a:hover {
    color: #161616;
}

/*Hide dropdown links until they are needed*/
.menu li ul {
    display: none;
    z-index: 100;
    width: 101.5%; /* width of drop down box */
}

/*Make dropdown links vertical*/
.menu li ul li {
    display: block;
    float: none;
    box-shadow: 0px 0px 5px 4px rgba(0, 0, 0, 0.08);
    -moz-box-shadow: 0px 0px 5px 4px rgba(0, 0, 0, 0.08);
    -webkit-box-shadow: 0px 0px 5px 4px rgba(0, 0, 0, 0.08);
}

.hidden li {
    width: 96%;
    height: 461px;
    background-color: white;
}
.hidden li img {
    margin-top: -55px;
}
.hidden
{
    left:0px;
    margin-top: -20px;
    margin-left: -2px;
}

/*Display the dropdown on hover*/
.menu ul li a:hover + .hidden, .hidden:hover {
    display: block;
}

2 个答案:

答案 0 :(得分:1)

您可以使用过渡选项来延迟悬停。试试这个:

div:hover{ 
    transition-delay:1s;
}

答案 1 :(得分:0)

您可以更改以下区域中的foundation.css -

.button, button {
...
}

或者您可以在style.css

中覆盖它