我正在尝试制作一个包含可点击图像的 div。我已经尝试了 Hyperlinking an image using CSS 上的所有技术(并承认它不应该在 CSS 中完成),并且还在其他地方寻找任何线索。
起初我以为这是因为我没有将 div 的大小设置为图像的大小,但我仍然无法使其工作。
任何想法将不胜感激。我尝试的页面在这里:http://...,即尝试使灯塔图形可点击(使用任何技术)。
最佳答案
您只需将 div
上的 margin-left
的 padding-left
更改为 id="pagetext"
在 style
属性中,一切都会正常。
<div id="pagetext" class="animated bounceInDown" style="width: 50%; margin-left: 25%; padding-top: 10px; text-align: center;">
<div class="line"></div>
<p style="line-height: 20px; margin-top: 10px; margin-bottom: 0px; text-align: justify;"></p>
<br>
<br>
<p style="line-height: 20px; margin-top: 10px; margin-bottom: 0px; text-align: justify;"></p>
<br>
<br>
<p style="line-height: 20px; margin-top: 10px; margin-bottom: 0px; text-align: justify;"></p>
<br>
<br>
<p style="line-height: 20px; margin-top: 10px; margin-bottom: 10px; text-align: justify;"></p>
<div class="line"></div></div>
关于javascript - 不起作用,可点击的 div 包含图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36283968/