是否可以创建辅助按钮,这些按钮会在人物悬停或点击主按钮时显示? 因此主按钮可以是#34; train"。然后当您将鼠标悬停在该按钮上时,将显示2个附加辅助按钮,例如"训练1"和#34;训练2"。
<div id="button_group">
<button type = "button" class = "Button" id="trains" > Trains </button> <br />
<button type = "button" class = "Button" id="train1" > Train 1 </button> <br />
<button type = "button" class = "Button" id="train2" > Train 2 </button> <br />
</div>
答案 0 :(得分:0)
添加此CSS:
#train1, #train2 {
display: none;
}
#button_group:hover > button {
display: inline-block;
}