Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/33.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
Css HTML5边框底部显示错误(?)_Css_Html_Border - Fatal编程技术网

Css HTML5边框底部显示错误(?)

Css HTML5边框底部显示错误(?),css,html,border,Css,Html,Border,无法在我的html窗口/视口底部设置边框属性 它就在最后一个html元素之后。e、 g.分区 有没有办法让它真正显示在窗口的底部? 这是我的css: html { border-bottom:5px solid rgb(17,17,17); border-top:5px solid rgb(17,17,17); } 非常感谢 尝试将正文标记边距和填充设置为0px。在html添加中 html { width:100%; /*height:99%; Fallback

无法在我的html窗口/视口底部设置边框属性

它就在最后一个html元素之后。e、 g.分区

有没有办法让它真正显示在窗口的底部? 这是我的css:

html {
   border-bottom:5px solid rgb(17,17,17);
   border-top:5px solid rgb(17,17,17);
}

非常感谢

尝试将正文标记边距和填充设置为0px。

在html添加中

html { 
    width:100%;
    /*height:99%; Fallback for older browsers*/
    height:calc(100% - 10px);       
    border-bottom:5px solid rgb(17,17,17);
    border-top:5px solid rgb(17,17,17);
}    
我想这会解决你的问题


以下是您需要指定宽度和高度的

html{
    border-bottom:5px;
    border-bottom-color:rgb(17, 17, 17);
    border-bottom-style:solid;
    border-top:5px;
    border-top-color:rgb(17, 17, 17);
    border-top-style:solid;
    width:100%;
    height:100%;
}
(这里有一个imgur相册来比较两者的区别:注意第一张图片下面有一个空白,这似乎是您的问题,而高度和宽度则是文档的底部)


编辑:如果您对滚动条有问题,请尝试99%或99.5%等。

对不起,那是什么边框?什么部门?提供相关代码。没有部门,我指的是整个文件<代码>html{边框底部:5px;边框底部颜色:rgb(17,17,17);边框底部样式:纯色;边框顶部:5px;边框顶部颜色:rgb(17,17,17);边框顶部样式:纯色;}应为
边框底部宽度
而非
边框底部
。。。与
边框顶部相同
。边框底部高度可能相同,是的。。。谢谢。那有点用。但我会自动得到一个滚动条向下滚动以查看边框。@fooness如果你有滚动条,请调整高度..Hm。我可以要100%-5px吗?试试高度:calc(100%-10px)这似乎有效!非常感谢!不幸的是,我得到了一个滚动条,必须向下滚动才能看到边框。正如我在编辑中所说的,把它弄得乱七八糟。试试99%的身高。见鬼,做99%的高度,而不是5倍的边框,做0.5%的边框。