gpt4 book ai didi

html - CSS:修复 div 位置

转载 作者:太空宇宙 更新时间:2023-11-03 19:07:05 25 4
gpt4 key购买 nike

我试图修复 response div 的位置:HTML 是:

<div id="response">
<table width="100%" cellspacing="5" style="background-image:url(images/bg.gif); background-repeat:no-repeat; width:100%;">
<tr>
<td class="clock" colspan="2"><?php include'scripts/clock.html'; ?></td>
</tr>
</table>
</div>
<div>
<img src="images/map.gif" border="0" usemap="#Msj_Map" alt="map" class="map" />
<map name="Msj_Map" id="Msj_Map">
<area id="8" shape="poly" coords="436,141,486,141,486,207,436,206" />
<area id="1" shape="poly" coords="163,148,163,170,159,170" />
<area id="2" shape="poly" coords="163,207,153,207,159,173,163,173" />
<area id="189" shape="poly" coords="198,281,199,307,161,307,161,282" />
<area id="190" shape="poly" coords="198,309,199,333,161,334,161,309" />
<area id="165" shape="poly" coords="540,230,570,230,577,236,577,271,540,271" />
<area id="40" shape="poly" coords="384,1156,419,1156,419,1180,383,1180" />
<area id="39" shape="poly" coords="422,1156,458,1156,458,1180,422,1181" />
<area id="54" shape="poly" coords="321,1109,353,1109,359,1116,360,1159,321,1159" />
<area id="29" shape="poly" coords="356,1235,387,1235,387,1274,356,1274" />
<area id="22" shape="poly" coords="390,1277,457,1277,457,1311,453,1315,390,1315" />
<area id="23" shape="poly" coords="321,1277,387,1277,387,1315,321,1315" />
<area id="24" shape="poly" coords="319,1277,319,1316,252,1316,252,1277" />
</map>
</div>

喜欢http://www.noobcube.com/wp-content/uploads/demos/062709-fixed-header-footer/demo/我使用了它的逻辑,但在实现过程中我发现 <map>标签不与其他元素一起发挥作用,因为 <map>在图像上绘制,因此不支持 overflow:scroll .但是<map>是我代码中的关键元素。

可能有一些其他的解决方案来修复它。

最佳答案

经过长时间的努力,我找到了 z-index 并为 response<map> 创建了 css分区:

.calculator{
z-index:1000;
position:fixed;
top:0px;
}
.map-wrap{
margin-top:350px;
}

<div id="response" class="calculator">
<table width="100%" cellspacing="5" style="background-image:url(images/bg.gif); background-repeat:no-repeat; width:100%;">
<tr>
<td class="clock" colspan="2"><?php include'scripts/clock.html'; ?></td>
</tr>
</table>
</div>
<div class="map-wrap">
<img src="images/map.gif" border="0" usemap="#Msj_Map" alt="map" class="map" />
<map name="Msj_Map" id="Msj_Map">
<area id="8" shape="poly" coords="436,141,486,141,486,207,436,206" />
<area id="1" shape="poly" coords="163,148,163,170,159,170" />
<area id="2" shape="poly" coords="163,207,153,207,159,173,163,173" />
<area id="189" shape="poly" coords="198,281,199,307,161,307,161,282" />
<area id="190" shape="poly" coords="198,309,199,333,161,334,161,309" />
<area id="165" shape="poly" coords="540,230,570,230,577,236,577,271,540,271" />
<area id="40" shape="poly" coords="384,1156,419,1156,419,1180,383,1180" />
<area id="39" shape="poly" coords="422,1156,458,1156,458,1180,422,1181" />
<area id="54" shape="poly" coords="321,1109,353,1109,359,1116,360,1159,321,1159" />
<area id="29" shape="poly" coords="356,1235,387,1235,387,1274,356,1274" />
<area id="22" shape="poly" coords="390,1277,457,1277,457,1311,453,1315,390,1315" />
<area id="23" shape="poly" coords="321,1277,387,1277,387,1315,321,1315" />
<area id="24" shape="poly" coords="319,1277,319,1316,252,1316,252,1277" />
</map>
</div>

然后摆脱它。 :)

谢谢大家。

关于html - CSS:修复 div 位置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9845820/

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