This is what it looks like when cliked on
This is the expectation when clicked on what i used to display this is the :hover event but i want it clickable
如果有任何可能,请尽快帮助修复 Javascript 编码
var content = document.getElementById("settingsBar");
var button = document.getElementById("show-more");
button.onclick = function() {
if (content.className == "drop") {
content.className = "";
} else {
content.className = "drop";
}
};
#settingsBar {
width: 100%;
position: fixed;
z-index: 1;
background-color: #000;
max-height: 56px;
overflow: hidden;
-webkit-transition: all 0.7s;
-moz-transition: all 0.7s;
transition: all 0.7s;
}
#settingsBar.drop {
max-height: 1000px;
color: #fff;
-webkit-transition: all 0.7s;
-moz-transition: all 0.7s;
transition: all 0.7s;
}
#show-more i {
padding-left: 48%;
padding-top: 15px;
color: #fff;
-webkit-transition: color 0.7s;
-moz-transition: color 0.7s;
transition: color 0.7s;
}
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<div id="settingsBar">
<a href="#" id="show-more"><i class="material-icons large">settings</i></a>
<br/>
<iframe src="http://www.pigigram.com/account_settings.php" scrolling="no" frameborder="0" width="100%"></iframe>
</div>
Basicly What i want is to have it open the content to display the iframe and allow them to use the settings
最佳答案
button.onclick = fucntion(); {
你拼错了函数这个词
关于javascript - 试图创建一个下拉菜单,但它不适用于 javascript,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35096785/