小编Joã*_*újo的帖子

无法在div中单击输入复选框

由于某些原因,将标签和输入内容放入div时,无法单击它们。这是我的意思。

#menu {
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    
}

#menu > a {
    color:#212121;
    text-align: center;
    width: 100%;
    background-color: darkorange;
    height: 50px;
    margin-bottom: 1px;
    text-decoration: none;
}

#menu > .button > p {
    font-family: 'Roboto'
}

#menu > a:hover {
    background-color: orangered;
}

#menu > a:visited {
    color:#212121;
}

------------------

.show-menu {
    display: flex;

    justify-content: center;
    width: 100%;
    text-align: center;
    
}

input[type=checkbox] {
    display: none;
}

input[type=checkbox]:checked ~ #menu {
    display: flex;
}

.show-menu {
    display: block; …
Run Code Online (Sandbox Code Playgroud)

html css input

2
推荐指数
1
解决办法
1366
查看次数

标签 统计

css ×1

html ×1

input ×1