gpt4 book ai didi

javascript - 重复背景直到达到高度

转载 作者:太空宇宙 更新时间:2023-11-04 12:37:51 26 4
gpt4 key购买 nike

出于某种原因,我无法在我的页面上设置最大高度。

代码如下:

html
{
min-width: 100%;
min-height: 100%;
}

body
{
margin:0;
padding:0;
font-family: Arial, Helvetica, sans-serif;
background-color: darkblue;
height: 1200px;
}

.tile {
display: inline-block;
width: 300px;
height: 300px;
/*border: 1px solid black;*/
transition: 2s all linear;
margin-top: -4px;
margin-left: -4px;
}

这是 JSFiddle:

http://jsfiddle.net/cty276x5/1/

它还应该在所有方向(宽度和高度)重复“正方形”,但当它们达到“背景高度/宽度限制”时被切断。

那么为什么我不能像以前那样限制高度呢?

最佳答案

在你的 .title 中设置高度等于 100vh

height: 100vh;

关于javascript - 重复背景直到达到高度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27134617/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com