首页 > 解决方案 > 试图将选取框放置在图像上方的精确位置。将图像放在父 div 中。在那个父 div 中,我有选取框 div

问题描述

无法在父 div 中找到 div....

我将在下面显示代码......已经尝试了所有位置:绝对;位置:固定;等等......在 .main 中的 .marq 和 .geek1 部分。我从其他地方复制了这段代码,我有点不知所措,奇迹我能走到这一步!我试图让 .geek1 文本在灰色区域中最后一次听到的下方的图像上滚动。需要最简单的解决方案。非常感谢!

<!DOCTYPE html> 
<html> 
<head> 
<title>Marquee Tag</title> 
<style> 
.main { 
    text-align:center;
    width: 380px;
    margin-left: 250px;
    margin-top: 50px; 
} 
.marq { 
    padding-top: 1px; 
    padding-bottom:1px;
    margin-left: 20px;

} 
.geek1 { 
    font-size:11px; 
    font-weight:bold;
    color:white; 
    padding-bottom:1px; 
} 
</style> 
</head>  

<body> 
<div class = "main">
<img src="3-5_DMR_2_For_Web.jpg" width="400" height="240" alt="Natural" 
/>
<marquee class="marq" bgcolor = "636562" direction = "left" loop="" >
    <div class="geek1">2 &nbsp N &nbsp K4WZV &nbsp Robert</div> 
</marquee> 
</div> 
</body> 
</html>     

寻找任何人都可以提供的帮助....

标签: htmlcss

解决方案


我不这么认为,但也许 z-index 应该有很大帮助。我不确定你想做什么告诉我你想把灰色区域放在哪里。


推荐阅读