How to integrate delayed drop down code

Im sure im not the only one with this problem, But some of my customers complain about the category drop down menu’s. When the mouse moves off the category, it disappears.



I found a code that you can integrate into the css for a delayed drop down, so if your mouse moves off the category, it wont disappear.



Problem is, I dont know where to put it or how to code it in…



This is what i found:







#delayed-drops .nav-item.show .drops {
display: block;
}


Where and how do i put this into my website?