我有个问题要解决我正在做一个网站,我打算把网站的最后一部分,使用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的位置,将位置设置为绝对位置,但不起作用,我也将位置设置为相对位置,情况变得更糟,因为div已经停留在页面的顶部(它需要停留在底部),我将底部、左侧和右侧的值设置为0像素,但没有任何效果,继续悬停在底部。
1条答案
按热度按时间smdnsysy1#
设置“框大小:边框”到“div.Edrv1v“