Quantcast
Channel: Active questions tagged html - Stack Overflow
Viewing all articles
Browse latest Browse all 67497

I can't get a transition effect inside a dropdown to work [duplicate]

$
0
0

This question already has an answer here:

I'm trying to transition effect for my menu's dropdown, but unlike the other cases, I can't manage to get it work. I've search lots of theards around here and over google as well. I found no solution.

Here's my code:

.dropdown2 {
    position: relative;
    display: inline-block;
}

.dropdown-content2 {
    display: none;
    position: absolute;
    background-color: #e1e1e1;
    color: #000;
    min-width: 150px;
    height: 220px;
    z-index: 999;
    font-size: 20px;
    margin-right: -10px;
    top: 34px;
    transition: height 2s;
}

.dropdown-content2 a {
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    border-bottom: 5px solid white;
}

.dropdown2:hover .dropdown-content2 {
    display: block;
}


.dropdown2:hover .dropbtn2 {
    background-color: #e1e1e1;
}

HTML:

<div class="menu_option dropdown2"><a href="?go=articles">articles</a>
                    <div class="dropdown-content2">
                        <a href="?go=news">news</a>
                        <a href="?go=reviews">reviews</a>
                        <a href="?go=guides">guides</a>
                        <a href="?go=art">art</a>
                    </div>
                </div>

And it doesn't work.


Viewing all articles
Browse latest Browse all 67497

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>