このコードについて少し助けが必要です。メニューを作成しようとしています。私はこれをjsFiddleで示しました
私の問題は、ボタン(実際にはボタンではありません)にカーソルを合わせると、ボタンが動き続けることです。ボタンを現在の場所に保持するには、どのような方法を使用できますか?
これが私のコードの一部です
<div id="start_bar">
<div id ="start_button">
Test
<div id="nav">
Hello World
</div>
</div>
</div>
およびcss
#start_button{
height:48px;
width:48px;
background-image:url('images/start.png');
color:white;
}
#start_button:hover {
height:48px;
width:48px;
background-image:url('images/start.png');
margin-top: -18px;
}
#nav {
display: none;
}
#start_button:hover > #nav {
display: block;
width: 70px;
height: 150px;
margin-top: -150px;
background-color: grey;
}