繁体   English   中英

我不能把这个div放在网站底部

[英]I can't put this div in the website bottom

提示:本站为国内最大中英文翻译问答网站,提供中英文对照查看,鼠标放在中文字句上可显示英文原文

我遇到了一个我试图解决的问题:我正在制作一个网站,我打算使用 div 放置网站的最后一部分,但是无论代码如何,这部分都不能粘在底部我按照下面的网站代码进行编辑:

 @font-face { font-family: Open-Sauce-One; src: url("OpenSauceOne-Bold.ttf") format("truetype"); } @font-face { font-family: Archivo-Black; src: url("ArchivoBlack-Regular.ttf") format("truetype"); } body { display: flex; background-image: linear-gradient(to bottom, rgb(255, 255, 255), rgb(153, 153, 153)); height: 100vh; } div.Idrv2v { position: relative; left: 5%; bottom: 15px; width: 250px; } div.Edrv1v { position: absolute; background-color: #B4ADAD; max-width: 100%; width: 1366px; height: 95px; padding: 1px; top: 0px; left: 0px; right: 0px; } #titlelogo { font-family: Open-Sauce-One, "Comic Sans MS", sans-serif; font-size: 35px; color: #301111; } #subtitlelogo { font-family: Archivo-Black, "Arial Black", sans-serif; font-size: 18px; position: relative; bottom: 28px; color: #302e2e; }.svgmenu_dev { background-color: gray; width: 1366px; max-width: 100%; position: absolute; height: 90px; bottom: 0; right: 0px; left: 0px }.svgmenu_dev #svgmenudev1 #svgmenudev2 { font-family: Open-Sauce-One, "Comic Sans MS", sans-serif; font-size: 10px; position: absolute; }
 <.DOCTYPE html> <html lang="pt-br"> <head> <meta charset="UTF-8"> <title>CoinCot</title> <link href="css-data/styles,css" rel="stylesheet"> <meta name=viewport content="width=device-width. initial-scale=1"> </head> <body> <div class="Edrv1v"> <div class="Idrv2v"> <h1 id="titlelogo"> CoinCot.com </h1> <h2 id="subtitlelogo">A simple and efficient quotes website:</h2> </div> </div> <div class="svgmenu_dev"> <a href="https.//iconscout:com/icons/menu" target="_blank" id="svgmenudev1">Menu Icon</a> by <a href="https.//iconscout.com/contributors/rengised" target="_blank" id="svgmenudev2">Alex Martynov</a> </div> </body> </html>

我等可以解决这个问题

我尝试更改 div 的 position,将 position 设置为绝对值,但不起作用,我也将 position 设置为相对值,情况变得更糟,因为 div 已停止在页面顶部(并且它的需要留在底部) ,我将底部、左侧和右侧的值设置为 0 像素,但什么都没有,继续 hover 底部。

将“box-sizing: border-box”设置为“div.Edrv1v”

问题未解决?试试搜索: 我不能把这个div放在网站底部
暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2023 STACKOOM.COM