Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/loops/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 为什么不是';我的复选框驱动菜单不工作吗?_Html_Css - Fatal编程技术网

Html 为什么不是';我的复选框驱动菜单不工作吗?

Html 为什么不是';我的复选框驱动菜单不工作吗?,html,css,Html,Css,如果选中复选框,我将尝试打开菜单。当我检查它时,它没有做任何改变,我的菜单仍然关闭。我最近开始从事“网页编程”(我甚至不知道这是否是正确的术语)。 我使用了#菜单,因为我的复选框Id是Menu。它在一个输入元素中 .List{ position: absolute; top: 70px; left: 0; width: 100%; height: 100vh; background-color: rgba(51, 51, 51, 0.9);

如果选中复选框,我将尝试打开菜单。当我检查它时,它没有做任何改变,我的菜单仍然关闭。我最近开始从事“网页编程”(我甚至不知道这是否是正确的术语)。 我使用了#菜单,因为我的复选框Id是Menu。它在一个输入元素中

.List{
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(51, 51, 51, 0.9);
    font-size: 25px;
    transition: all 0.5s;
    transform: translateX(-100%);
}
.List a{
    font-weight: bolder;
    display: block;
    color: white;
    height: 50px;
    text-decoration: none;
    padding-top: 15px;
    padding-left: 15px;
    padding-right: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3)
}

.List a:hover{
    background: rgba(255, 255, 255, 0.3);
}

#Menu:checked ~ .List{
    transform: translateX(0%);
}

这是一份声明,要求对公用事业进行检查

<div class='col-xs-12 col-sm-1 col-md-1'>
    <div class='checkbox'>
    <label style='position: absolute;top: 15px;'><input id='mas' type='checkbox' 
     value='' name='check' onclick='Check(this)'>Mas</label>
    </div>
    </div>
}


espero te sirva

请将您的标记包含在帖子中,并使用编辑器构建一个功能片段。这很难帮助完成一半的故事。您需要以特定的方式定位标记。我今天的票数没有了;如果我明天还记得的话,我会过来提供重复的目标。这能回答你的问题吗?我不知道加价是什么,哈哈,对不起。但我会看看你寄给我什么,非常感谢你们所有人啊dale muchas gracias!这是一个很好的例子,它是一个很好的例子!
  <div class='col-xs-12 col-sm-4 col-md-4' hidden id='idmenuoculto'>
    <label class='labels' for='idmenu'>Menu</label>
    <select class='form-control' id='idmenu' style= 'margin-bottom: 10px'>
    </select>
    </div>
function Check(checkbox) {
if (checkbox.id == 'mas' && checkbox.checked == true) {
    $("#idmenuoculto").show();
 

} else if (checkbox.id == 'mas' && checkbox.checked == false) {
    $("#idmenuoculto").hide();
}