gpt4 book ai didi

html - 用数据做同心正方形

转载 作者:太空宇宙 更新时间:2023-11-04 09:23:31 25 4
gpt4 key购买 nike

我已经将两个响应式方 block 一个嵌入另一个。现在我想在每个方 block 内添加表格行。我在内部正方形内添加了表格,但我想在外部正方形(外部的那个)内添加表格,并希望数据在侧面进行调整,并且数据不应隐藏在内部正方形下方。我在引用下方添加了图片。

enter image description here

下面是贴出的代码。

<style>
.square {
background: pink;
width: 45vw;
height: 45vw;
position:relative;
}
.square2 {
background: red;
width: 30vw;
height: 30vw;
position:absolute;
margin-left:17%;
margin-top:17%;
}
</style>
<div class="square">
<table id="myTable">
<tr>
<td><a href="">blah blah</a></td>
<td>blah blah</td>
<td>blah blah</td>
<td>blah blah</td>
<td>blah blah</td>
<td>blah blah</td>
<td>blah blah</td>
<td>blah blah</td>
<td>blah blah</td>
<td>blah blah</td>
<td>blah blah</td>
<td>blah blah</td>
<td>blah blah</td>
<td>blah blah</td>
<td>blah blah</td>
<td>blah blah</td>
<td>blah blah</td>
<td>blah blah</td>
</tr>
<tr>
<td><a href="">blah blah</a></td>
<td>blah blah</td>
<td>blah blah</td>
<td>blah blah</td>
<td>blah blah</td>
<td>blah blah</td>
<td>blah blah</td>
<td>blah blah</td>
<td>blah blah</td>
<td>blah blah</td>
<td>blah blah</td>
<td>blah blah</td>
<td>blah blah</td>
<td>blah blah</td>
<td>blah blah</td>
<td>blah blah</td>
<td>blah blah</td>
<td>blah blah</td>
</tr>
</table>
<div class="square2">
<table id="myTable">
<tr>
<td><a href="">blah blah</a></td>
<td><a href="">blah blah</a></td>
<td><a href="">blah blah</a></td>
<td>blah blah</td>
<td>blah blah</td>
<td>blah blah</td>
</tr>
<tr>

<td>blah blah</td>
<td>blah blah</td>
<td>blah blah</td>
<td>blah blah</td>
<td>blah blah</td>
<td>blah blah</td>
</tr>
<tr>
<td>blah blah</td>
<td>blah blah</td>
<td>blah blah</td>
<td>blah blah</td>
<td>blah blah</td>
<td>blah blah</td>
</tr>
<tr>
<td>blah blah</td>
<td>blah blah</td>
<td>blah blah</td>
<td>blah blah</td>
<td>blah blah</td>
<td>blah blah</td>
</tr>
<tr>
<td>blah blah</td>
<td>blah blah</td>
<td>blah blah</td>
<td>blah blah</td>
<td>blah blah</td>
<td>blah blah</td>
</tr>
<tr>
<td>blah blah</td>
<td>blah blah</td>
<td>blah blah</td>
<td>blah blah</td>
<td>blah blah</td>
<td>blah blah</td>
</tr>
<tr>
<td>blah blah</td>
<td>blah blah</td>
<td>blah blah</td>
<td>blah blah</td>
<td>blah blah</td>
<td>blah blah</td>
</tr>
</table>
</div>
</div>

最佳答案

您需要拆分您的 table 。请参阅此链接。检查它是否满足您的要求。

https://plnkr.co/edit/FoJ24ZqyWdJpRJoQuhXD?p=preview

#myTable2{
....
}

关于html - 用数据做同心正方形,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41329646/

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