我正面临一个从未经历过的非常奇怪的问题!!我的网站上有一个html链接如下:
<div>
<a href="https://www.facebook.com/">Facebook</a>
</div>
不幸的是,它显示为纯文本“Facebook”,而不是可点击的链接文本!
这种奇怪行为背后的原因可能是什么?期待专家们的帮助!!
以下是完整代码:
@{
ViewBag.Title = "News";
}
<link rel="stylesheet" type="text/css" href="~/Content/css/pixeden-icons.css">
<link rel="stylesheet" href="~/Content/css/main.css">
<div id="banner-area">
<img src="~/Content/images/banner/banner2.jpg" alt="" style="width: 100%; height: 350px;" />
<div class="parallax-overlay"></div>
<!-- Subpage title start -->
<div class="banner-title-content">
<div class="text-center">
<h2>News and Events</h2>
<ul class="breadcrumb">
<li>@Html.ActionLink("Home", "Index", "Home")</li>
<li>@Html.ActionLink("News and Events", "News", "NewsAndEvents")</li>
</ul>
</div>
</div><!-- Subpage title end -->
</div><!-- Banner area end -->
<div>
<a href="https://www.facebook.com/">FaceBook</a>
</div>
<div class="container archive">
<div class="pageContentArea archive-content">
<div class="timeline-wrap">
<article>
<time datetime="2015-01-31 08:30:45.687">26 jan,2015</time>
<div class="article_inner">
<h1>The Lego Movie” snubbed at the Oscars</h1>
<img src="~/Content/images/News/img1.jpg" alt="" />
<p>
Pellentesque quis sapien eleifend aliquet, morbi ideru dictum finibus blandit. Phasellus a iaculis hiri habitase platea dictumst neque, tincinq mangas.
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</p>
<!-- <a class="readMore" href="#">Read More..</a> -->
</div>
</article>
</div><!--timeline-wrap-->
</div><!--pageContentArea-->
</div><!--container-->
@section scripts {
<script src="~/Scripts/js/jquery.dlmenu.js"></script>
<script src="~/Scripts/js/jquery.sticky.js"></script>
<script src="~/Scripts/js/main.js"></script>
}
谢谢!
答案 0 :(得分:0)
问题不在于你的html语法。 <a href="https://www.facebook.com/">FaceBook</a>
一切都还可以。也许它被css文件中的某些样式(text-decoration: none)
覆盖,该文件包含在<head>
部分中。要调试此问题,请尝试将text-decoration:underline
(默认值)设置为锚标记,从浏览器检查中确保它不会被其他样式或脚本覆盖。