Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/71.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/34.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_Browser_Navigation_Compatibility - Fatal编程技术网

Html 支持所有设备和浏览器上的移动导航:但什么';它叫什么名字?

Html 支持所有设备和浏览器上的移动导航:但什么';它叫什么名字?,html,css,browser,navigation,compatibility,Html,Css,Browser,Navigation,Compatibility,我使用以下代码在移动设备上进行导航。(代码非常截断。) html{ 背景色:rgba(190234,16,0.30); } 输入[类型=复选框]{ 位置:绝对位置; 顶部:-9999px; 左:-9999px; } 导航{ 文本对齐:居中; 背景色:白色; 边界半径:30px; 垫面:5px; 垫底:5px; 边缘顶部:5px; 边缘底部:5px; } 输入[类型=复选框]:未(:选中)~.导航{ 显示:无; } #复选框标签{ 显示:块; 文本对齐:居中; 字体大小:30px; 背景色:白色

我使用以下代码在移动设备上进行导航。(代码非常截断。)


html{
背景色:rgba(190234,16,0.30);
}
输入[类型=复选框]{
位置:绝对位置;
顶部:-9999px;
左:-9999px;
}
导航{
文本对齐:居中;
背景色:白色;
边界半径:30px;
垫面:5px;
垫底:5px;
边缘顶部:5px;
边缘底部:5px;
}
输入[类型=复选框]:未(:选中)~.导航{
显示:无;
}
#复选框标签{
显示:块;
文本对齐:居中;
字体大小:30px;
背景色:白色;
边界半径:30px;
}
航行

点击“导航”可以显示和隐藏导航。这真是太棒了。我还用一些设备和浏览器检查了它,当然不是全部

当然,我希望这对我的网站的每个用户都有效,完全兼容浏览器。我还尝试用谷歌搜索浏览器支持,但这并不容易,因为我甚至不知道这个“功能”的名称


你们当中有人知道这件事吗?这个“功能”的名称?浏览器兼容性?

我认为它的移动导航菜单

<!DOCTYPE html>
<html>
<head>
<style>
html    {
    background-color:rgba(190, 234, 16, 0.30);
}
input[type=checkbox] {
    position:absolute;
    top:-9999px;
    left:-9999px;
}
nav {
    text-align:center;
    background-color:white;
    border-radius:30px;
    padding-top:5px;
    padding-bottom:5px;
    margin-top:5px;
    margin-bottom:5px;
}
input[type=checkbox]:not(:checked) ~ .navigation {
    display:none;
}
#checkbox_label {
    display:block;
    text-align:center;
    font-size:30px;
    background-color:white;
    border-radius:30px;
}
</style>
</head>
<body>

<label id="checkbox_label" for="checkbox">Navigation</label><input type="checkbox" id="checkbox">

<nav class="navigation">
<p><a href="">Test1</a></p>
<p><a href="">Test2</a></p>
<p><a href="">Test3</a></p>
<p><a href="">Test4</a></p>
</nav>

</body>
</html>