Saya ingin membuat sub dropdown menggunakan materialize css class dropdown-content. Tetapi kode berikut tidak berfungsi:

<a class='dropdown-button btn' href='#' data-activates='dropdown1' data-beloworigin="true">Drop1!</a>
<ul id='dropdown1' class='dropdown-content'>
    <li><a href="#!">item1</a></li>
    <li><a href="#!">item2</a></li>
    <li id="drop2" ><a class='dropdown-button2 d' href='#'  data-hover="hover" data-alignment="left">dropagain</a></li>
</ul>
<ul id="drop2" class='dropdown-content'>
    <li><a href="#!">Item3</a></li>
    <li><a href="#!">Item4</a></li>
</ul>
0
pooja_agrawal 11 Desember 2017, 15:12

1 menjawab

Jawaban Terbaik
.dropdown-content {
   overflow-y: visible;
}

.dropdown-content .dropdown-content {
   margin-left: 100%;
}



<a class='dropdown-button btn' href='#' data-activates='dropdown1' data-beloworigin="true">Drop1!</a>
<ul id='dropdown1' class='dropdown-content'>
    <li><a href="#!">item1</a></li>
    <li><a href="#!">item2</a></li>
    <li id="drop2" ><a class='dropdown-button2 d' href='#'  data-hover="hover" data-alignment="left">dropagain</a></li>
</ul>
<ul id="drop2" class='dropdown-content'>
    <li><a href="#!">Item3</a></li>
    <li><a href="#!">Item4</a></li>
</ul>
0
tarun joshi 11 Desember 2017, 13:39