我有一个下拉菜单,点击按钮即可显示菜单。
我必须添加一个图标:>单击菜单时单击该图标需要更改位置,问题是它没有回来......
有人可以帮我修复这段代码,以便关闭菜单会让图标回来吗?
.dropbtn {
background-color: transparent;
color: #000;
padding: 16px 0px 0px 20px;
font-size: 16px;
border: none;
cursor: pointer;
}
.dropbtn:before {
content: "\003e";
color: #000;
padding-right: 10px;
}
.dropbtn:hover:before {
content: "\003e";
display: inline-block;
-webkit-transform: rotateZ(90deg);
-moz-transform: rotateZ(90deg);
-o-transform: rotateZ(90deg);
-ms-transform: rotateZ(90deg);
transform: translate(-5px, 5px) rotateZ(90deg);
}
.dropbtn:hover,
.dropbtn:focus {
background-color: transparent;
color: #000
}
.dropdown {
position: relative;
display: inline-block;
margin: 50px 0px;
width: 100%;
z-index: 0
}
.dropdown-content {
display: none;
position: absolute;
background-color: #fff;
overflow: auto;
width: 100%;
padding-bottom: 40px
}
#menu-category {
margin: 0
}
.dropdown-content a {
color: #000;
padding: 12px 0px 0px 60px;
text-decoration: none;
display: block;
width: 100%;
font-size: 14px;
}
.show {
display: block;
}
<body>
<div class="dropdown">
<a href="#" class="work-dd">Work</a>
<button onclick="myFunction()" class="dropbtn">Overview</button>
<div id="myDropdown" class="dropdown-content">
....code of menu...
</div>
</div>
</body>
switch mode
{
case 1:
{
wordGrid.GestureRecognizers.Add(new TapGestureRecognizer
{
NumberOfTapsRequired = 1,
Command = new Command(() =>
{
abc();
}),
});
break;
}
case 2:
{
if(start)
{
Device.StartTimer(TimeSpan.FromSeconds(5), () =>
{
Device.BeginInvokeOnMainThread(() =>
{
abc();
});
return false;
});
}
break;
}
}