<分区>
<分区>
我想将图像与文本链接起来,因此当我调整窗口大小时,文本将随图像一起移动。这是一个例子 google.de .正如您所看到的,在调整窗口大小时,谷歌 Logo 下方的文本会随着图像一起移动。
这是我尝试过的。
HTML
<div class="logo"><img src="here is my logo" width="350"></div>
<div class="textlogo">Here is the text</div>
CSS
.logo
{
text-align:center;
}
.logo img
{
position:relative;
}
.textlogo
{
position:absolute;
top:25%;
left:64%;
}
最佳答案
希望这会帮助你理解方法(没有火箭科学)
关于html - 如何在html中链接图像和文本?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12762146/