我有两个充当链接的div( <a>
(。一段中的一个,第二段中的另一段。第二个链接起作用:在鼠标上(在Chrome中(窗口的左下方显示链接地址。顶部没有做同样的事情。怎么了?我说的是段落标签中的链接,而不是菜单链接。
<body ontouchstart>
<div class="header">
<div class="logo">Q<sup>3</sup></div>
<div class="desc">Quito's Qustom Qode</div>
</div>
<div class="row">
<div class="sidenav col2">
<a id="about" class="link-active">about</a>
<a id="pricing">pricing</a>
<a id="projects">projects</a>
<a id="legal">legal</a>
</div>
</div><!-- /row -->
<div class="row">
<div id="content" class="col10">
<div class="info">
<div class="about">
<div class="profile-back">
<div class="profile"></div>
</div>
<div class="about-me">
<p>Kevin (Quito [Key'-tow]) Williams is an aspiring front-end web designer. He has 5 years of experience in HTML, 4 years experience in CSS, and is currently studying jQuery. As a modern web designer, he is using his coding background to study the latest web technologies: HTML5, CSS3, <a href="http://www.google.com">RWD</a>. In addition to his web technology languages, he is also familiar with: C<sup>++</sup>, Javascript, Java, Perl, Lua (Minecraft based), LISP, SQL. </p>
<p><a href="http://www.google.com">Hello</a></p>
您忘记了通过HREF在锚标签上添加实际链接。
您当前的代码:
<a id="about" class="link-active">about</a>
<a id="pricing">pricing</a>
<a id="projects">projects</a>
<a id="legal">legal</a>
更改:
<a href="#" id="about" class="link-active">about</a>
<a href="#" id="pricing">pricing</a>
<a href="#" id="projects">projects</a>
<a href="#" id="legal">legal</a>
您可以更清楚自己期望的结果吗?
编辑:我想我现在明白了,"定价"项目"应该是超链接?
您缺少标签中应该解决问题的" href"属性。
如果您不希望链接直接到另一个页面,则可以使用href ="#"停止此。
您是否涉及以下几行?
<a href="http://www.google.com">RWD</a>.
<p><a href="http://www.google.com">Hello</a></p>
如果是这样,两者在Chrome和IE中都可以正常工作。我不确定您的问题是什么。
尝试此代码,在您的a href
中添加target =" _ blank" <p><a href="http://www.google.com" target="_blank">Hello</a></p>
和工作小提琴链接在这里https://jsfiddle.net/p7mnsj3p/