<分区>
编辑问题以包含 desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem .这将有助于其他人回答问题。
关闭 6 年前。
<分区>
编辑问题以包含 desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem .这将有助于其他人回答问题。
关闭 6 年前。
我想设计包括文本和图像在内的整个 Logo 的样式,使其成为指向主页的链接。唯一的条件是 Logo 的外观和外观应与现在的外观和外观相同,并且当前外观应继续为悬停期间、单击后以及单击期间的外观。在所有页面的左上角都可以看到 Logo 。
这是我的 html:
<div class="logo">
<img class="logomap" src="india.jpg" alt="logo" height="47" width="47">mehnat<br>.IN
</div>
请推荐!!
最佳答案
用 a
标签包裹整个 logo html 内容,如下所示:
<a href="your homepage link"> Here comes your all logo html content </a>
因此根据您的 Logo ,代码变为:
<a href="yourlink">
<div class="logo">
<img class="logomap" src="india.jpg" alt="logo" height="47" width="47">mehnat<br>.IN
</div>
</a>
我已经在您的网站上进行了测试,效果很好。但更好的方法是将您的图片包裹在一个标签中,并将您的 div
放在外面,例如:
<div class="logo">
<a href="yourlink">
<img class="logomap" src="india.jpg" alt="logo" height="47" width="47">mehnat<br>.IN
</a>
</div>
请使用适合您的上述两种方法之一!
关于html - 我如何设置包括文本和图像在内的整个 Logo 的样式以成为主页的链接?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43390384/