如何让div标签链接回首页?
http://www.winteradagency.com/Arvin/advantages/advantages.htm
我需要左上角的徽标来链接回该网站的主页。我不知道如何使标签中包含锚标签。
谢谢!
http://www.winteradagency.com/Arvin/advantages/advantages.htm
I need the logo in the top left corner to link back to the home page for this site. I can't figure out how to make a tag have an anchor tag in it.
thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
在标题 div 中添加这样的元素,以将透明链接放在徽标顶部:
将其添加到样式表中:
Add an element like this in the header div to put a transparent link on top of the logo:
Add this to the style sheet:
我在左上角没有看到徽标;页面顶部有红色块,然后“激励”从中间开始,其他选项从右侧开始。目前尚不清楚您想要返回主页的内容。
I don't see a logo in the top left corner; there's the red block all across the top of the page, and then "Incentives" starts in the middle and the other choices go from the right there. It's unclear what you want to go back to the home page.
鉴于其答案的简单性,我不确定这是否是一个真正的问题。我只能假设我一定错过了一些明显的事情。但要解决:
有这样的:
致地址:
据我所知,您不能嵌套
标签。我可能是错的,但我确信我在Eric Meyer 的网站上读过(不,我可以'找不到这篇文章,抱歉)这是不可能的。也许可以用 JS 来实现?
I'm unsure if this is a real question, given the simplicity of its answer. I can only assume I must've missed something obvious. But to address:
There's this:
To address:
You can't, so far as I know, nest
<a>
tags. I could be wrong, but I'm sure that I read, on Eric Meyer's site (and no, I can't find the article, sorry) that it wasn't possible. It could be effected with JS, perhaps?由于您的整个标题是一张图像(包括徽标),因此您需要使用图像映射来完成此操作。我知道 Dreamweaver 有一种简单的方法来创建它们。 Bing 为第一个链接返回 this。
Since your entire header is one image (including the logo) you would need to use an image map to do it. I know Dreamweaver has an easy way to create those. Bing returns this for the first link.
您需要添加一个覆盖徽标所在区域的地图标签。
示例:请注意,坐标必须是您希望能够单击的区域的实际坐标。
You need to add a map tag that covers the area where the logo is.
Example: note that the co-ordinates need to be the actual coordinates for the area you want to be able to click.
只是一个块标签。
HTML 中的标签分为块标签和内联标签
的作用就像 div 一样。您可以通过在 css 中执行小更改的标记来替换标记:添加 {display:block} 以及可能的 {text-decoration:none;颜色:黑色;光标:正常}
<div>
is just a block tag.The tags in HTML are divided in block tags and inline tags
<a style="display:block">
will act just like div. You replace tag by tag performing small changes in your css: adding {display:block} and maybe {text-decoration:none; color:black; cursor:normal}