我正在设计一个网页,其中一个链接无效...它甚至不能作为链接工作..只是看起来像纯文本...这是我的代码:
<a href="index.jsp" class="classname" style=" margin-top:50px;margin-left:1130px"> < </a>
<a href="index.jsp" class="classname1" > > </a>
我的链接网址是正确的,如果我把这个锚标签放在链接工作的代码中的其他地方..但是这里没有。我是网页设计新手并且不知道错误是什么?有任何想法吗? 这是我的完整代码:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<link rel="shortcut icon" href="ico/E-Mail.ico">
<title>Mail Detective</title>
<!-- Bootstrap core CSS -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="css/dashboard.css" rel="stylesheet">
<link href="font-awesome/css/font-awesome.css" rel="stylesheet">
<link href="css/hover.css" rel="stylesheet">
<link href="css/button.css" rel="stylesheet">
<!-- Just for debugging purposes. Don't actually copy this line! -->
<!--[if lt IE 9]><script src="../../assets/js/ie8-responsive-file-warning.js"></script><![endif]-->
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<style>
a, u {
text-decoration: none;
}
</style>
</head>
<body>
<div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.jsp">Mail Detective</a>
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav navbar-right">
<li><a href="#">E-Mails</a></li>
<li><a href="#">Settings</a></li>
<li><a href="#">Profile</a></li>
<li><a href="#">Help</a></li>
</ul>
<form class="navbar-form navbar-right" action="Search.jsp" method="get">
<input type="text" class="form-control" placeholder="Search..." name="search">
<!-- a href="index.jsp"><input type="submit" value=login style="color: transparent; background-color: transparent; border-color: transparent; cursor: default;"></a-->
</form>
</div>
</div>
</div>
<div class="container-fluid">
<div class="row">
<div class="col-sm-3 col-md-2 sidebar">
<ul class="nav nav-sidebar">
<li class="active"><a href="gmail_like.jsp">Inbox</a></li>
<li><a href="Starred.jsp">Starred</a></li>
<li><a href="Spam.jsp">Spam</a></li>
<li><a href="Sentmail.jsp">Sentmail</a></li>
<li><a href="Drafts.jsp">Drafts</a></li>
<li><a href="Trash.jsp">Trash</a></li>
<li><a href="Allmail.jsp">All</a></li>
</ul>
</div>
<% int value=Integer.parseInt(request.getParameter("item"));%>
<a href="index.jsp" class="classname" style=" margin-top:50px;margin-left:1130px";> < </a>
<a href="index.jsp" class="classname1" > > </a>
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main" style="margin-top:-60px">
<h1 class="page-header">E-Mails</h1>
<!--<div class="row placeholders">
</div>!-->
<!--<h2 class="sub-header"></h2>-->
<!--NOTIFICATION STARTS-->
<div class="col-lg-4" style="margin-left:850px">
<div class="panel panel-default">
<div class="panel-heading">
<i class="fa fa-bell fa-fw"></i> Notifications Panel
</div>
<!-- /.panel-heading -->
<div class="panel-body">
<div class="list-group">
<a href="#" class="list-group-item">
<i class="fa fa-comment fa-fw"></i> New Comment
<span class="pull-right text-muted small"><em>4 minutes ago</em>
</span>
</a>
<a href="#" class="list-group-item">
<i class="fa fa-twitter fa-fw"></i> 3 New Followers
<span class="pull-right text-muted small"><em>12 minutes ago</em>
</span>
</a>
<a href="#" class="list-group-item">
<i class="fa fa-envelope fa-fw"></i> Message Sent
<span class="pull-right text-muted small"><em>27 minutes ago</em>
</span>
</a>
<a href="#" class="list-group-item">
<i class="fa fa-tasks fa-fw"></i> New Task
<span class="pull-right text-muted small"><em>43 minutes ago</em>
</span>
</a>
<a href="#" class="list-group-item">
<i class="fa fa-upload fa-fw"></i> Server Rebooted
<span class="pull-right text-muted small"><em>11:32 AM</em>
</span>
</a>
<a href="#" class="list-group-item">
<i class="fa fa-bolt fa-fw"></i> Server Crashed!
<span class="pull-right text-muted small"><em>11:13 AM</em>
</span>
</a>
<a href="#" class="list-group-item">
<i class="fa fa-warning fa-fw"></i> Server Not Responding
<span class="pull-right text-muted small"><em>10:57 AM</em>
</span>
</a>
<a href="#" class="list-group-item">
<i class="fa fa-shopping-cart fa-fw"></i> New Order Placed
<span class="pull-right text-muted small"><em>9:49 AM</em>
</span>
</a>
<a href="#" class="list-group-item">
<i class="fa fa-money fa-fw"></i> Payment Received
<span class="pull-right text-muted small"><em>Yesterday</em>
</span>
</a>
</div>
<!-- /.list-group -->
<a href="#" class="btn btn-default btn-block">View All Alerts</a>
</div>
<!-- /.panel-body -->
</div>
<!--NOTIFICATION ENDS-->
<div class="table-responsive" style="margin-top:-530px;margin-left:-900px;font-size:15px;width:900px;background-color: #f5f5f5">
<table class="table table-striped">
<%@ page import="check.test4query" %>
<% test4query demo = new test4query();
//out.println(value);
test4query dem = new test4query();
test4query de = new test4query();
test4query d = new test4query();
String[] id =new String[30];
String[] dat =new String[30];
String[] nam =new String[30];
String[] mailid =new String[30];
int i;
demo.mai("SELECT ?x WHERE { ?y <FOLDERNAME:> 'inbox' . ?y <SUB:> ?x} LIMIT 30 OFFSET"+value);
for(i=0;i<30;i++)
{ id[i]=test4query.arr[i];
id[i] = id[i].substring(0, Math.min(id[i].length(), 100));
}
dem.mai("SELECT ?x WHERE { ?y <FOLDERNAME:> 'inbox' . ?y <DATE:> ?x} LIMIT 30 OFFSET"+value);
for(i=0;i<30;i++)
{ dat[i]=test4query.arr[i];
dat[i] = dat[i].substring(0, Math.min(dat[i].length(), 19));
}
de.mai("SELECT ?x WHERE { ?y <FOLDERNAME:> 'inbox' . ?y <SENDERNAME:> ?x} LIMIT 30 OFFSET"+value);
for(i=0;i<30;i++)
{ nam[i]=test4query.arr[i];
nam[i] = nam[i].substring(0, Math.min(nam[i].length(), 16));
}
demo.mai("SELECT ?x WHERE { ?y <FOLDERNAME:> 'inbox' . ?y <MESSAGEID:> ?x} LIMIT 30 OFFSET"+value);
for(i=0;i<30;i++)
{ mailid[i]=test4query.arr[i];
//mailid[i] = mailid[i].substring(0, Math.min(id[i].length(), 100));
}
for(i=0;i<30;i++)
{ //id[i]=test4query.arr[i];
out.println("<tr height='5'><td width='120'style='font-size:15px'>"+nam[i]+"</td><td width='400'>"+"<a href='final.jsp?itemId="+mailid[i]+"' class='button grow' style=' text-decoration: none; color:black;font-size:15px;'>"+"    "+id[i]+"<hr style='border-color:#E6E6E6;padding:0px;margin:0px'>"+"</a>"+"</td><td width='90' style='font-size:12px'>"+""+dat[i]+"</td>"+"</tr>");
}i--;
%>
</table>
</div>
</div>
</div>
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/docs.min.js"></script>
</body>
</html>
答案 0 :(得分:0)
也许你在边缘左边忘记了一个分号:1130px;
希望这可以提供帮助
答案 1 :(得分:0)
试试这个..
Use instead < for < and > for >
我也使用你的HTML代码
<a href="index.jsp" class="classname" style=" margin-top:50px;margin-left:1130px"> < </a>
<a href="index.jsp" class="classname1" > > </a>
它也在工作......如果它没有在适当的位置重定向,则意味着你在href中的路径不正确。
答案 2 :(得分:0)
使用chrome开发人员工具找出原因。
基本点是使用CSS可以使链接看起来像普通文本。如果你想知道这个样式的编写地点,你可以使用我提到的开发人员工具。