分页标签
JSTL(JSP Standard Tag Library,JSP标准标签库):
常用的标签比如:
1、forEach标签
<c:forEach var="i" begin="1" end="10" step ="2">
<c:set var="sum" value="${sum + i}" />
</c:forEach>
2、choose标签
<c:choose>
<c:when test="${score > 100 || score < 0}">错误的分数:${score }</c:when>
<c:when test="${score >= 90 }">A级</c:when>
<c:when test="${score >= 80 }">B级</c:when>
<c:when test="${score >= 70 }">C级</c:when>
<c:when test="${score >= 60 }">D级</c:when>
<c:otherwise>E级</c:otherwise>
</c:choose>
3、if标签
<c:set var="a" value="hello"/>
<c:if test="${not empty a }">
<c:out value="${a }"/>
</c:if>
实现分页标签
1.1、标签处理类(画分页标签)
该类可以继承TagSupport 实现doStartTag和doEndTag方法
package org.crdit.PagerTag;
import java.io.IOException;
import javax.servlet.jsp.JspException; import javax.servlet.jsp.JspWriter; import javax.servlet.jsp.tagext.TagSupport; /** * @author crd * 创建标签处理类 */ public class Pager extends TagSupport {
private int pageIndex; //当前页码 private int pageSize; //每一页显示的记录数 private int totalNum; //总记录数 private String submitUrl; //提交地址 private String pageStyle="";//样式
public int getPageIndex() { return pageIndex; }
public void setPageIndex(int pageIndex) { if(pageIndex==0){ pageIndex = 1; } this.pageIndex = pageIndex; }
public int getPageSize() { return pageSize; }
public void setPageSize(int pageSize) { this.pageSize = pageSize; }
public int getTotalNum() { return totalNum; }
public void setTotalNum(int totalNum) { this.totalNum = totalNum; }
public String getSubmitUrl() { return submitUrl; }
public void setSubmitUrl(String submitUrl) { this.submitUrl = submitUrl; }
public String getPageStyle() { return pageStyle; }
public void setPageStyle(String pageStyle) { this.pageStyle = pageStyle; }
@Override public int doStartTag() throws JspException { try { JspWriter jspWriter= this.pageContext.getOut(); //创建StringBuffer实例,用于拼装页码相关信息 StringBuffer sbf=new StringBuffer();
String jumpUrl; //判断总记录数是否大于0 if(totalNum>0){ //计算总共的页数 int totalPageNum=this.totalNum%this.pageSize==0?this.totalNum/this.pageSize:this.totalNum/this.pageSize+1; StringBuffer pager=new StringBuffer(); //如果当前在第一页 if(pageIndex==1){ pager.append("<span class='disabled'>上一页</span>"); //计算中间页码 calcMiddle(pager,totalPageNum);
//如果总共就一页,那么下一页也不能点击 if(totalPageNum==1){ pager.append("<span class='disabled'>下一页</span>"); }else{ jumpUrl=this.submitUrl.replace("{0}", String.valueOf(this.pageIndex+1)); //可以点击下一页 pager.append("<a href='"+jumpUrl+"'>下一页</a>"); }
//如果当前页码是尾页 }else if(this.pageIndex==totalPageNum){ jumpUrl=this.submitUrl.replace("{0}", String.valueOf(this.pageIndex-1)); //可以点击下一页 pager.append("<a href='"+jumpUrl+"'>上一页</a>");
//计算中间页码 calcMiddle(pager,totalPageNum);
pager.append("<span class='disabled'>下一页</span>"); //当前页码既不是首页也不是尾页 }else{ jumpUrl=this.submitUrl.replace("{0}", String.valueOf(this.pageIndex-1)); //可以点击下一页 pager.append("<a href='"+jumpUrl+"'>上一页</a>");
//计算中间页码 calcMiddle(pager,totalPageNum); jumpUrl=this.submitUrl.replace("{0}", String.valueOf(this.pageIndex+1)); //可以点击下一页 pager.append("<a href='"+jumpUrl+"'>下一页</a>"); } sbf.append("<table align='center' class='"+pageStyle+"' style='width:100%;font-size:14px'> <tr><td>"+pager.toString()+"</td></tr>"); //定义开始记录号,每页显示10条 int startSize=(this.pageIndex-1)*this.pageSize+1; //定义结束记录号 int endSize=this.pageIndex==totalPageNum?totalNum:this.pageIndex*this.pageSize;
sbf.append("<tr><td>总共<font color='red'>"+totalNum+"</font>条记录,当前显示"+startSize+"-"+endSize+"条记录</td></tr></table>"); }else{ sbf.append("<table align='center' class='"+pageStyle+"' style='width:100%;font-size:14px'><tr><td>总共<font color='red'>0</font>条记录,当前显示0-0条记录</td></tr></table>"); }
jspWriter.write(sbf.toString()); } catch (IOException e) { e.printStackTrace(); } return super.doStartTag(); }
/** * 计算中间页码 * @param pager * @param totalPageNum 总页码数 */ public void calcMiddle(StringBuffer pager,int totalPageNum) { String jumpUrl=""; //如果总页码数小于等于10 1 2 3 4 5 6 7 8 9 10 if(totalPageNum<=10){ for (int i = 1; i < totalPageNum; i++) { //如果i等于当前页码,则不能点 if(i==this.pageIndex){ pager.append("<span class='current'>"+i+"</span>"); }else{ jumpUrl=this.submitUrl.replace("{0}",String.valueOf(i)); pager.append("<a href='"+jumpUrl+"'>"+i+"</a>"); }
} }else{ //如果当前页码靠近首页 1 2 3 4 5 6 7 8 9 ... 100 if(pageIndex<=8){ for (int i = 1; i <=9; i++) { //如果i等于当前页码,则不能点 if(i==this.pageIndex){ pager.append("<span class='current'>"+i+"</span>"); }else{ jumpUrl=this.submitUrl.replace("{0}",String.valueOf(i)); pager.append("<a href='"+jumpUrl+"'>"+i+"</a>"); } } pager.append("...");
//拼装尾页 jumpUrl=this.submitUrl.replace("{0}",String.valueOf(totalPageNum)); pager.append("<a href='"+jumpUrl+"'>"+totalPageNum+"</a>");
//当前页码靠近尾页 }else if(pageIndex+8>=totalPageNum){ //拼装首页 jumpUrl=this.submitUrl.replace("{0}",String.valueOf(1)); pager.append("<a href='"+jumpUrl+"'>"+1+"</a>");
pager.append("...");
for (int i = totalPageNum-9; i <=totalPageNum; i++) { //如果i等于当前页码,则不能点 if(i==this.pageIndex){ pager.append("<span class='current'>"+i+"</span>"); }else{ jumpUrl=this.submitUrl.replace("{0}",String.valueOf(i)); pager.append("<a href='"+jumpUrl+"'>"+i+"</a>"); } } //当前页码靠中间 }else{ //拼装首页 jumpUrl=this.submitUrl.replace("{0}",String.valueOf(1)); pager.append("<a href='"+jumpUrl+"'>"+1+"</a>");
pager.append("...");
for (int i = this.pageIndex-4; i <=this.pageIndex+4; i++) { //如果i等于当前页码,则不能点 if(i==this.pageIndex){ pager.append("<span class='current'>"+i+"</span>"); }else{ jumpUrl=this.submitUrl.replace("{0}",String.valueOf(i)); pager.append("<a href='"+jumpUrl+"'>"+i+"</a>"); } }
pager.append("...");
//拼装尾页 jumpUrl=this.submitUrl.replace("{0}",String.valueOf(totalPageNum)); pager.append("<a href='"+jumpUrl+"'>"+totalPageNum+"</a>"); } } }
} |
1.2、需要tld文件(描述标签信息)
该文件必须放在WEB-INF下:
tld文件的作用:将标签处理类和页面中的分页标签衔接在一块,在Tomcat服务器下可以找到tld文件
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN" "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd"> <taglib> <!-- 标签版本号 --> <tlibversion>1.0</tlibversion> <!-- JSP版本号 --> <jspversion>1.1</jspversion> <!-- 标签简称号 --> <shortname>checkLogon</shortname> <!-- URI地址,jsp页面可以通过引入该地址与标签进行关联 并找到标签处理类 --> <uri>myPager-tag</uri> <info> 我的分页标签,总共24种 </info> <tag> <!-- 指定标签名 --> <name>pager</name> <!-- 标签处理类 需要指定 包名+类名 --> <tagclass>org.crdit.PagerTag.Pager</tagclass> <!-- 标签中的属性 --> <attribute> <!--声明属性名称 --> <name>pageIndex</name> <!-- 是否必填 --> <required>false</required> <!-- 是否支持EL表达式 --> <rtexprvalue>true</rtexprvalue> </attribute> <attribute> <name>pageSize</name> <required>false</required> <rtexprvalue>true</rtexprvalue> </attribute> <attribute> <name>totalNum</name> <required>false</required> <rtexprvalue>true</rtexprvalue> </attribute> <attribute> <name>submitUrl</name> <required>false</required> <rtexprvalue>true</rtexprvalue> </attribute> <attribute> <name>pageStyle</name> <required>false</required> <rtexprvalue>true</rtexprvalue> </attribute> </tag> </taglib> |
1.3、页面中引入分页标签(需要做分页的页面才引入分页标签)
<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%> <!-- 引入分页标签 --> <%@ taglib prefix="crd" uri="myPager-tag"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Insert title here</title> <!-- 引入分页样式 --> <link rel=stylesheet type="text/css" href="${pageContext.request.contextPath}/css/pager.css"> </head> <body> <!-- pageIndex:当前页码 pageSize:每一页显示的记录数 totalNum:总记录数 pageStyle:样式 submitUrl:提交地址 --> <crd:pager pageIndex="${pageIndex}" pageSize="10" totalNum="999" pageStyle="meneame" submitUrl="list.action?pageIndex={0}"></crd:pager> </body> </html> |
ListServlet
package org.crdit.PagerTag;
import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse;
/** * Servlet implementation class ListServlet */ @WebServlet("/list.action") public class ListServlet extends HttpServlet { private static final long serialVersionUID = 1L;
/** * @see HttpServlet#HttpServlet() */ public ListServlet() { super(); // TODO Auto-generated constructor stub }
/** * @see HttpServlet#service(HttpServletRequest request, HttpServletResponse response) */ protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // TODO Auto-generated method stub //获取页码 String pageIndex=request.getParameter("pageIndex"); if(pageIndex==null || pageIndex.equals(" ")){ pageIndex="1"; } request.setAttribute("pageIndex", pageIndex); //跳转到列表页面 request.getRequestDispatcher("/pager.jsp").forward(request, response); } }
|
附:
Pager.css
.digg { PADDING-RIGHT: 3px; PADDING-LEFT: 3px; PADDING-BOTTOM: 3px; MARGIN: 3px; PADDING-TOP: 3px; TEXT-ALIGN: center } .digg A { BORDER-RIGHT: #aaaadd 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #aaaadd 1px solid; PADDING-LEFT: 5px; PADDING-BOTTOM: 2px; MARGIN: 2px; BORDER-LEFT: #aaaadd 1px solid; COLOR: #000099; PADDING-TOP: 2px; BORDER-BOTTOM: #aaaadd 1px solid; TEXT-DECORATION: none } .digg A:hover { BORDER-RIGHT: #000099 1px solid; BORDER-TOP: #000099 1px solid; BORDER-LEFT: #000099 1px solid; COLOR: #000; BORDER-BOTTOM: #000099 1px solid } .digg A:active { BORDER-RIGHT: #000099 1px solid; BORDER-TOP: #000099 1px solid; BORDER-LEFT: #000099 1px solid; COLOR: #000; BORDER-BOTTOM: #000099 1px solid } .digg SPAN.current { BORDER-RIGHT: #000099 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #000099 1px solid; PADDING-LEFT: 5px; FONT-WEIGHT: bold; PADDING-BOTTOM: 2px; MARGIN: 2px; BORDER-LEFT: #000099 1px solid; COLOR: #fff; PADDING-TOP: 2px; BORDER-BOTTOM: #000099 1px solid; mso-para-margin-bottom:0.0000gd;text-align:left;">} .digg SPAN.disabled { BORDER-RIGHT: #eee 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #eee 1px solid; PADDING-LEFT: 5px; PADDING-BOTTOM: 2px; MARGIN: 2px; BORDER-LEFT: #eee 1px solid; COLOR: #ddd; PADDING-TOP: 2px; BORDER-BOTTOM: #eee 1px solid }
/*CSS yahoo style pagination*/ .yahoo { PADDING-RIGHT: 3px; PADDING-LEFT: 3px; PADDING-BOTTOM: 3px; MARGIN: 3px; PADDING-TOP: 3px; TEXT-ALIGN: center } .yahoo A { BORDER-RIGHT: #fff 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #fff 1px solid; PADDING-LEFT: 5px; PADDING-BOTTOM: 2px; MARGIN: 2px; BORDER-LEFT: #fff 1px solid; COLOR: #000099; PADDING-TOP: 2px; BORDER-BOTTOM: #fff 1px solid; TEXT-DECORATION: underline } .yahoo A:hover { BORDER-RIGHT: #000099 1px solid; BORDER-TOP: #000099 1px solid; BORDER-LEFT: #000099 1px solid; COLOR: #000; BORDER-BOTTOM: #000099 1px solid } .yahoo A:active { BORDER-RIGHT: #000099 1px solid; BORDER-TOP: #000099 1px solid; BORDER-LEFT: #000099 1px solid; COLOR: #f00; BORDER-BOTTOM: #000099 1px solid } .yahoo SPAN.current { BORDER-RIGHT: #fff 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #fff 1px solid; PADDING-LEFT: 5px; FONT-WEIGHT: bold; PADDING-BOTTOM: 2px; MARGIN: 2px; BORDER-LEFT: #fff 1px solid; COLOR: #000; PADDING-TOP: 2px; BORDER-BOTTOM: #fff 1px solid; mso-para-margin-bottom:0.0000gd;text-align:left;">} .yahoo SPAN.disabled { BORDER-RIGHT: #eee 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #eee 1px solid; PADDING-LEFT: 5px; PADDING-BOTTOM: 2px; MARGIN: 2px; BORDER-LEFT: #eee 1px solid; COLOR: #ddd; PADDING-TOP: 2px; BORDER-BOTTOM: #eee 1px solid }
/*CSS meneame style pagination*/ .meneame { PADDING-RIGHT: 3px; PADDING-LEFT: 3px; FONT-SIZE: 80%; PADDING-BOTTOM: 3px; MARGIN: 3px; COLOR: #ff6500; PADDING-TOP: 3px; TEXT-ALIGN: center } .meneame A { BORDER-RIGHT: #ff9600 1px solid; PADDING-RIGHT: 7px; BACKGROUND-POSITION: 50% bottom; BORDER-TOP: #ff9600 1px solid; PADDING-LEFT: 7px; BACKGROUND-IMAGE: url(meneame.jpg); PADDING-BOTTOM: 5px; BORDER-LEFT: #ff9600 1px solid; COLOR: #ff6500; MARGIN-RIGHT: 3px; PADDING-TOP: 5px; BORDER-BOTTOM: #ff9600 1px solid; TEXT-DECORATION: none } .meneame A:hover { BORDER-RIGHT: #ff9600 1px solid; BORDER-TOP: #ff9600 1px solid; BACKGROUND-IMAGE: none; BORDER-LEFT: #ff9600 1px solid; COLOR: #ff6500; BORDER-BOTTOM: #ff9600 1px solid; mso-para-margin-bottom:0.0000gd;text-align:left;">} .meneame A:active { BORDER-RIGHT: #ff9600 1px solid; BORDER-TOP: #ff9600 1px solid; BACKGROUND-IMAGE: none; BORDER-LEFT: #ff9600 1px solid; COLOR: #ff6500; BORDER-BOTTOM: #ff9600 1px solid; mso-para-margin-bottom:0.0000gd;text-align:left;">} .meneame SPAN.current { BORDER-RIGHT: #ff6500 1px solid; PADDING-RIGHT: 7px; BORDER-TOP: #ff6500 1px solid; PADDING-LEFT: 7px; FONT-WEIGHT: bold; PADDING-BOTTOM: 5px; BORDER-LEFT: #ff6500 1px solid; COLOR: #ff6500; MARGIN-RIGHT: 3px; PADDING-TOP: 5px; BORDER-BOTTOM: #ff6500 1px solid; mso-para-margin-bottom:0.0000gd;text-align:left;">} .meneame SPAN.disabled { BORDER-RIGHT: #ffe3c6 1px solid; PADDING-RIGHT: 7px; BORDER-TOP: #ffe3c6 1px solid; PADDING-LEFT: 7px; PADDING-BOTTOM: 5px; BORDER-LEFT: #ffe3c6 1px solid; COLOR: #ffe3c6; MARGIN-RIGHT: 3px; PADDING-TOP: 5px; BORDER-BOTTOM: #ffe3c6 1px solid }
/*CSS flickr style pagination*/ .flickr { PADDING-RIGHT: 3px; PADDING-LEFT: 3px; PADDING-BOTTOM: 3px; MARGIN: 3px; PADDING-TOP: 3px; TEXT-ALIGN: center } .flickr A { BORDER-RIGHT: #dedfde 1px solid; PADDING-RIGHT: 6px; BACKGROUND-POSITION: 50% bottom; BORDER-TOP: #dedfde 1px solid; PADDING-LEFT: 6px; PADDING-BOTTOM: 2px; BORDER-LEFT: #dedfde 1px solid; COLOR: #0061de; MARGIN-RIGHT: 3px; PADDING-TOP: 2px; BORDER-BOTTOM: #dedfde 1px solid; TEXT-DECORATION: none } .flickr A:hover { BORDER-RIGHT: #000 1px solid; BORDER-TOP: #000 1px solid; BACKGROUND-IMAGE: none; BORDER-LEFT: #000 1px solid; COLOR: #fff; BORDER-BOTTOM: #000 1px solid; mso-para-margin-bottom:0.0000gd;text-align:left;">} .meneame A:active { BORDER-RIGHT: #000 1px solid; BORDER-TOP: #000 1px solid; BACKGROUND-IMAGE: none; BORDER-LEFT: #000 1px solid; COLOR: #fff; BORDER-BOTTOM: #000 1px solid; mso-para-margin-bottom:0.0000gd;text-align:left;">} .flickr SPAN.current { PADDING-RIGHT: 6px; PADDING-LEFT: 6px; FONT-WEIGHT: bold; PADDING-BOTTOM: 2px; COLOR: #ff0084; MARGIN-RIGHT: 3px; PADDING-TOP: 2px } .flickr SPAN.disabled { PADDING-RIGHT: 6px; PADDING-LEFT: 6px; PADDING-BOTTOM: 2px; COLOR: #adaaad; MARGIN-RIGHT: 3px; PADDING-TOP: 2px }
/*CSS sabrosus style pagination*/ .sabrosus { PADDING-RIGHT: 3px; PADDING-LEFT: 3px; PADDING-BOTTOM: 3px; MARGIN: 3px; PADDING-TOP: 3px; TEXT-ALIGN: center } .sabrosus A { BORDER-RIGHT: #9aafe5 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #9aafe5 1px solid; PADDING-LEFT: 5px; PADDING-BOTTOM: 2px; BORDER-LEFT: #9aafe5 1px solid; COLOR: #2e6ab1; MARGIN-RIGHT: 2px; PADDING-TOP: 2px; BORDER-BOTTOM: #9aafe5 1px solid; TEXT-DECORATION: none } .sabrosus A:hover { BORDER-RIGHT: #2b66a5 1px solid; BORDER-TOP: #2b66a5 1px solid; BORDER-LEFT: #2b66a5 1px solid; COLOR: #000; BORDER-BOTTOM: #2b66a5 1px solid; mso-para-margin-bottom:0.0000gd;text-align:left;">} .pagination A:active { BORDER-RIGHT: #2b66a5 1px solid; BORDER-TOP: #2b66a5 1px solid; BORDER-LEFT: #2b66a5 1px solid; COLOR: #000; BORDER-BOTTOM: #2b66a5 1px solid; mso-para-margin-bottom:0.0000gd;text-align:left;">} .sabrosus SPAN.current { BORDER-RIGHT: navy 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: navy 1px solid; PADDING-LEFT: 5px; FONT-WEIGHT: bold; PADDING-BOTTOM: 2px; BORDER-LEFT: navy 1px solid; COLOR: #fff; MARGIN-RIGHT: 2px; PADDING-TOP: 2px; BORDER-BOTTOM: navy 1px solid; mso-para-margin-bottom:0.0000gd;text-align:left;">} .sabrosus SPAN.disabled { BORDER-RIGHT: #929292 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #929292 1px solid; PADDING-LEFT: 5px; PADDING-BOTTOM: 2px; BORDER-LEFT: #929292 1px solid; COLOR: #929292; MARGIN-RIGHT: 2px; PADDING-TOP: 2px; BORDER-BOTTOM: #929292 1px solid }
/*CSS scott style pagination*/ .scott { PADDING-RIGHT: 3px; PADDING-LEFT: 3px; PADDING-BOTTOM: 3px; MARGIN: 3px; PADDING-TOP: 3px; TEXT-ALIGN: center } .scott A { BORDER-RIGHT: #ddd 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #ddd 1px solid; PADDING-LEFT: 5px; PADDING-BOTTOM: 2px; BORDER-LEFT: #ddd 1px solid; COLOR: #88af3f; MARGIN-RIGHT: 2px; PADDING-TOP: 2px; BORDER-BOTTOM: #ddd 1px solid; TEXT-DECORATION: none } .scott A:hover { BORDER-RIGHT: #85bd1e 1px solid; BORDER-TOP: #85bd1e 1px solid; BORDER-LEFT: #85bd1e 1px solid; COLOR: #638425; BORDER-BOTTOM: #85bd1e 1px solid; mso-para-margin-bottom:0.0000gd;text-align:left;">} .scott A:active { BORDER-RIGHT: #85bd1e 1px solid; BORDER-TOP: #85bd1e 1px solid; BORDER-LEFT: #85bd1e 1px solid; COLOR: #638425; BORDER-BOTTOM: #85bd1e 1px solid; mso-para-margin-bottom:0.0000gd;text-align:left;">} .scott SPAN.current { BORDER-RIGHT: #b2e05d 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #b2e05d 1px solid; PADDING-LEFT: 5px; FONT-WEIGHT: bold; PADDING-BOTTOM: 2px; BORDER-LEFT: #b2e05d 1px solid; COLOR: #fff; MARGIN-RIGHT: 2px; PADDING-TOP: 2px; BORDER-BOTTOM: #b2e05d 1px solid; mso-para-margin-bottom:0.0000gd;text-align:left;">} .scott SPAN.disabled { BORDER-RIGHT: #f3f3f3 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #f3f3f3 1px solid; PADDING-LEFT: 5px; PADDING-BOTTOM: 2px; BORDER-LEFT: #f3f3f3 1px solid; COLOR: #ccc; MARGIN-RIGHT: 2px; PADDING-TOP: 2px; BORDER-BOTTOM: #f3f3f3 1px solid }
/*CSS quotes style pagination*/ .quotes { PADDING-RIGHT: 3px; PADDING-LEFT: 3px; PADDING-BOTTOM: 3px; MARGIN: 3px; PADDING-TOP: 3px; TEXT-ALIGN: center } .quotes A { BORDER-RIGHT: #ddd 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #ddd 1px solid; PADDING-LEFT: 5px; PADDING-BOTTOM: 2px; BORDER-LEFT: #ddd 1px solid; COLOR: #aaa; MARGIN-RIGHT: 2px; PADDING-TOP: 2px; BORDER-BOTTOM: #ddd 1px solid; TEXT-DECORATION: none } .quotes A:hover { BORDER-RIGHT: #a0a0a0 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #a0a0a0 1px solid; PADDING-LEFT: 5px; PADDING-BOTTOM: 2px; BORDER-LEFT: #a0a0a0 1px solid; MARGIN-RIGHT: 2px; PADDING-TOP: 2px; BORDER-BOTTOM: #a0a0a0 1px solid } .quotes A:active { BORDER-RIGHT: #a0a0a0 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #a0a0a0 1px solid; PADDING-LEFT: 5px; PADDING-BOTTOM: 2px; BORDER-LEFT: #a0a0a0 1px solid; MARGIN-RIGHT: 2px; PADDING-TOP: 2px; BORDER-BOTTOM: #a0a0a0 1px solid } .quotes SPAN.current { BORDER-RIGHT: #e0e0e0 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #e0e0e0 1px solid; PADDING-LEFT: 5px; FONT-WEIGHT: bold; PADDING-BOTTOM: 2px; BORDER-LEFT: #e0e0e0 1px solid; COLOR: #aaa; MARGIN-RIGHT: 2px; PADDING-TOP: 2px; BORDER-BOTTOM: #e0e0e0 1px solid; mso-para-margin-bottom:0.0000gd;text-align:left;">} .quotes SPAN.disabled { BORDER-RIGHT: #f3f3f3 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #f3f3f3 1px solid; PADDING-LEFT: 5px; PADDING-BOTTOM: 2px; BORDER-LEFT: #f3f3f3 1px solid; COLOR: #ccc; MARGIN-RIGHT: 2px; PADDING-TOP: 2px; BORDER-BOTTOM: #f3f3f3 1px solid }
/*CSS black style pagination*/ .black { PADDING-RIGHT: 3px; PADDING-LEFT: 3px; FONT-SIZE: 80%; PADDING-BOTTOM: 10px; MARGIN: 3px; COLOR: #a0a0a0; PADDING-TOP: 10px; TEXT-ALIGN: center } .black A { BORDER-RIGHT: #909090 1px solid; PADDING-RIGHT: 5px; BACKGROUND-POSITION: 50% bottom; BORDER-TOP: #909090 1px solid; PADDING-LEFT: 5px; BACKGROUND-IMAGE: url(bar.gif); PADDING-BOTTOM: 2px; BORDER-LEFT: #909090 1px solid; COLOR: #c0c0c0; MARGIN-RIGHT: 3px; PADDING-TOP: 2px; BORDER-BOTTOM: #909090 1px solid; TEXT-DECORATION: none } .black A:hover { BORDER-RIGHT: #f0f0f0 1px solid; BORDER-TOP: #f0f0f0 1px solid; BACKGROUND-IMAGE: url(invbar.gif); BORDER-LEFT: #f0f0f0 1px solid; COLOR: #ffffff; BORDER-BOTTOM: #f0f0f0 1px solid; mso-para-margin-bottom:0.0000gd;text-align:left;">} .black A:active { BORDER-RIGHT: #f0f0f0 1px solid; BORDER-TOP: #f0f0f0 1px solid; BACKGROUND-IMAGE: url(invbar.gif); BORDER-LEFT: #f0f0f0 1px solid; COLOR: #ffffff; BORDER-BOTTOM: #f0f0f0 1px solid; mso-para-margin-bottom:0.0000gd;text-align:left;">} .black SPAN.current { BORDER-RIGHT: #ffffff 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #ffffff 1px solid; PADDING-LEFT: 5px; FONT-WEIGHT: bold; PADDING-BOTTOM: 2px; BORDER-LEFT: #ffffff 1px solid; COLOR: #ffffff; MARGIN-RIGHT: 3px; PADDING-TOP: 2px; BORDER-BOTTOM: #ffffff 1px solid; mso-para-margin-bottom:0.0000gd;text-align:left;">} .black SPAN.disabled { BORDER-RIGHT: #606060 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #606060 1px solid; PADDING-LEFT: 5px; PADDING-BOTTOM: 2px; BORDER-LEFT: #606060 1px solid; COLOR: #808080; MARGIN-RIGHT: 3px; PADDING-TOP: 2px; BORDER-BOTTOM: #606060 1px solid }
/*CSS black2 style pagination*/ .black2 { PADDING-RIGHT: 7px; PADDING-LEFT: 7px; PADDING-BOTTOM: 7px; MARGIN: 3px; PADDING-TOP: 7px; TEXT-ALIGN: center } .black2 A { BORDER-RIGHT: #000000 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #000000 1px solid; PADDING-LEFT: 5px; PADDING-BOTTOM: 2px; MARGIN: 2px; BORDER-LEFT: #000000 1px solid; COLOR: #000000; PADDING-TOP: 2px; BORDER-BOTTOM: #000000 1px solid; TEXT-DECORATION: none } .black2 A:hover { BORDER-RIGHT: #000000 1px solid; BORDER-TOP: #000000 1px solid; BORDER-LEFT: #000000 1px solid; COLOR: #fff; BORDER-BOTTOM: #000000 1px solid; mso-para-margin-bottom:0.0000gd;text-align:left;">} .black2 A:active { BORDER-RIGHT: #000000 1px solid; BORDER-TOP: #000000 1px solid; BORDER-LEFT: #000000 1px solid; COLOR: #fff; BORDER-BOTTOM: #000000 1px solid; mso-para-margin-bottom:0.0000gd;text-align:left;">} .black2 SPAN.current { BORDER-RIGHT: #000000 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #000000 1px solid; PADDING-LEFT: 5px; FONT-WEIGHT: bold; PADDING-BOTTOM: 2px; MARGIN: 2px; BORDER-LEFT: #000000 1px solid; COLOR: #fff; PADDING-TOP: 2px; BORDER-BOTTOM: #000000 1px solid; mso-para-margin-bottom:0.0000gd;text-align:left;">} .black2 SPAN.disabled { BORDER-RIGHT: #eee 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #eee 1px solid; PADDING-LEFT: 5px; PADDING-BOTTOM: 2px; MARGIN: 2px; BORDER-LEFT: #eee 1px solid; COLOR: #ddd; PADDING-TOP: 2px; BORDER-BOTTOM: #eee 1px solid }
/*CSS black-red style pagination*/ .black-red { FONT-SIZE: 11px; COLOR: #fff; FONT-FAMILY: Tahoma, Arial, Helvetica, Sans-serif; mso-para-margin-bottom:0.0000gd;text-align:left;">} .black-red A { PADDING-RIGHT: 5px; PADDING-LEFT: 5px; PADDING-BOTTOM: 2px; MARGIN: 2px; COLOR: #fff; PADDING-TOP: 2px; TEXT-DECORATION: none } .black-red A:hover { COLOR: #fff; mso-para-margin-bottom:0.0000gd;text-align:left;">} .black-red A:active { COLOR: #fff; mso-para-margin-bottom:0.0000gd;text-align:left;">} .black-red SPAN.current { PADDING-RIGHT: 5px; PADDING-LEFT: 5px; FONT-WEIGHT: bold; PADDING-BOTTOM: 2px; MARGIN: 2px; COLOR: #fff; PADDING-TOP: 2px; mso-para-margin-bottom:0.0000gd;text-align:left;">} .black-red SPAN.disabled { PADDING-RIGHT: 5px; PADDING-LEFT: 5px; PADDING-BOTTOM: 2px; MARGIN: 2px; COLOR: #868686; PADDING-TOP: 2px; mso-para-margin-bottom:0.0000gd;text-align:left;">}
/*CSS grayr style pagination*/ .grayr { PADDING-RIGHT: 2px; PADDING-LEFT: 2px; FONT-SIZE: 11px; PADDING-BOTTOM: 2px; PADDING-TOP: 2px; FONT-FAMILY: Tahoma, Arial, Helvetica, Sans-serif; mso-para-margin-bottom:0.0000gd;text-align:left;">} .grayr A { PADDING-RIGHT: 5px; PADDING-LEFT: 5px; PADDING-BOTTOM: 2px; MARGIN: 2px; COLOR: #000; PADDING-TOP: 2px; TEXT-DECORATION: none } .grayr A:hover { COLOR: #000; mso-para-margin-bottom:0.0000gd;text-align:left;">} .grayr A:active { COLOR: #000; mso-para-margin-bottom:0.0000gd;text-align:left;">} .grayr SPAN.current { PADDING-RIGHT: 5px; PADDING-LEFT: 5px; FONT-WEIGHT: bold; PADDING-BOTTOM: 2px; MARGIN: 2px; COLOR: #303030; PADDING-TOP: 2px; mso-para-margin-bottom:0.0000gd;text-align:left;">} .grayr SPAN.disabled { PADDING-RIGHT: 5px; PADDING-LEFT: 5px; PADDING-BOTTOM: 2px; MARGIN: 2px; COLOR: #797979; PADDING-TOP: 2px; mso-para-margin-bottom:0.0000gd;text-align:left;">}
/*CSS yellow style pagination*/ .yellow { PADDING-RIGHT: 7px; PADDING-LEFT: 7px; PADDING-BOTTOM: 7px; MARGIN: 3px; PADDING-TOP: 7px; TEXT-ALIGN: center } .yellow A { BORDER-RIGHT: #ccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #ccc 1px solid; PADDING-LEFT: 5px; PADDING-BOTTOM: 2px; MARGIN: 2px; BORDER-LEFT: #ccc 1px solid; COLOR: #000; PADDING-TOP: 2px; BORDER-BOTTOM: #ccc 1px solid; TEXT-DECORATION: none } .yellow A:hover { BORDER-RIGHT: #f0f0f0 1px solid; BORDER-TOP: #f0f0f0 1px solid; BORDER-LEFT: #f0f0f0 1px solid; COLOR: #000; BORDER-BOTTOM: #f0f0f0 1px solid } .yellow A:active { BORDER-RIGHT: #f0f0f0 1px solid; BORDER-TOP: #f0f0f0 1px solid; BORDER-LEFT: #f0f0f0 1px solid; COLOR: #000; BORDER-BOTTOM: #f0f0f0 1px solid } .yellow SPAN.current { BORDER-RIGHT: #d9d300 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #d9d300 1px solid; PADDING-LEFT: 5px; FONT-WEIGHT: bold; PADDING-BOTTOM: 2px; MARGIN: 2px; BORDER-LEFT: #d9d300 1px solid; COLOR: #fff; PADDING-TOP: 2px; BORDER-BOTTOM: #d9d300 1px solid; mso-para-margin-bottom:0.0000gd;text-align:left;">} .yellow SPAN.disabled { BORDER-RIGHT: #eee 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #eee 1px solid; PADDING-LEFT: 5px; PADDING-BOTTOM: 2px; MARGIN: 2px; BORDER-LEFT: #eee 1px solid; COLOR: #ddd; PADDING-TOP: 2px; BORDER-BOTTOM: #eee 1px solid }
/*CSS jogger style pagination*/ .jogger { PADDING-RIGHT: 2px; PADDING-LEFT: 2px; PADDING-BOTTOM: 2px; MARGIN: 7px; PADDING-TOP: 2px; FONT-FAMILY: "Lucida Sans Unicode", "Lucida Grande", LucidaGrande, "Lucida Sans", Geneva, Verdana, sans-serif } .jogger A { PADDING-RIGHT: 0.64em; PADDING-LEFT: 0.64em; PADDING-BOTTOM: 0.43em; MARGIN: 2px; COLOR: #fff; PADDING-TOP: 0.5em; TEXT-DECORATION: none } .jogger A:hover { PADDING-RIGHT: 0.64em; PADDING-LEFT: 0.64em; PADDING-BOTTOM: 0.43em; MARGIN: 2px; COLOR: #fff; PADDING-TOP: 0.5em; mso-para-margin-bottom:0.0000gd;text-align:left;">} .jogger A:active { PADDING-RIGHT: 0.64em; PADDING-LEFT: 0.64em; PADDING-BOTTOM: 0.43em; MARGIN: 2px; COLOR: #fff; PADDING-TOP: 0.5em; mso-para-margin-bottom:0.0000gd;text-align:left;">} .jogger SPAN.current { PADDING-RIGHT: 0.64em; PADDING-LEFT: 0.64em; PADDING-BOTTOM: 0.43em; MARGIN: 2px; COLOR: #6d643c; PADDING-TOP: 0.5em; mso-para-margin-bottom:0.0000gd;text-align:left;">} .jogger SPAN.disabled { DISPLAY: none }
/*CSS starcraft2 style pagination*/ .starcraft2 { PADDING-RIGHT: 3px; PADDING-LEFT: 3px; FONT-WEIGHT: bold; FONT-SIZE: 13.5pt; PADDING-BOTTOM: 3px; MARGIN: 3px; COLOR: #fff; PADDING-TOP: 3px; FONT-FAMILY: Arial; TEXT-ALIGN: center } .starcraft2 A { MARGIN: 2px; COLOR: #fa0; TEXT-DECORATION: none } .starcraft2 A:hover { COLOR: #fff; mso-para-margin-bottom:0.0000gd;text-align:left;">} .starcraft2 A:active { COLOR: #fff; mso-para-margin-bottom:0.0000gd;text-align:left;">} .starcraft2 SPAN.current { FONT-WEIGHT: bold; MARGIN: 2px; COLOR: #fff; mso-para-margin-bottom:0.0000gd;text-align:left;">} .starcraft2 SPAN.disabled { MARGIN: 2px; COLOR: #444; mso-para-margin-bottom:0.0000gd;text-align:left;">}
/*CSS tres style pagination*/ .tres { PADDING-RIGHT: 7px; PADDING-LEFT: 7px; FONT-WEIGHT: bold; FONT-SIZE: 13.2pt; PADDING-BOTTOM: 7px; MARGIN: 3px; PADDING-TOP: 7px; FONT-FAMILY: Arial, Helvetica, sans-serif; TEXT-ALIGN: center } .tres A { BORDER-RIGHT: #d9d300 2px solid; PADDING-RIGHT: 5px; BORDER-TOP: #d9d300 2px solid; PADDING-LEFT: 5px; PADDING-BOTTOM: 2px; MARGIN: 2px; BORDER-LEFT: #d9d300 2px solid; COLOR: #fff; PADDING-TOP: 2px; BORDER-BOTTOM: #d9d300 2px solid; TEXT-DECORATION: none } .tres A:hover { BORDER-RIGHT: #ff0 2px solid; BORDER-TOP: #ff0 2px solid; BORDER-LEFT: #ff0 2px solid; COLOR: #000; BORDER-BOTTOM: #ff0 2px solid; mso-para-margin-bottom:0.0000gd;text-align:left;">} .tres A:active { BORDER-RIGHT: #ff0 2px solid; BORDER-TOP: #ff0 2px solid; BORDER-LEFT: #ff0 2px solid; COLOR: #000; BORDER-BOTTOM: #ff0 2px solid; mso-para-margin-bottom:0.0000gd;text-align:left;">} .tres SPAN.current { BORDER-RIGHT: #fff 2px solid; PADDING-RIGHT: 5px; BORDER-TOP: #fff 2px solid; PADDING-LEFT: 5px; FONT-WEIGHT: bold; PADDING-BOTTOM: 2px; MARGIN: 2px; BORDER-LEFT: #fff 2px solid; COLOR: #000; PADDING-TOP: 2px; BORDER-BOTTOM: #fff 2px solid } .tres SPAN.disabled { DISPLAY: none }
/*CSS megas512 style pagination*/ .megas512 { PADDING-RIGHT: 3px; PADDING-LEFT: 3px; PADDING-BOTTOM: 3px; MARGIN: 3px; PADDING-TOP: 3px; TEXT-ALIGN: center } .megas512 A { BORDER-RIGHT: #dedfde 1px solid; PADDING-RIGHT: 6px; BACKGROUND-POSITION: 50% bottom; BORDER-TOP: #dedfde 1px solid; PADDING-LEFT: 6px; PADDING-BOTTOM: 2px; BORDER-LEFT: #dedfde 1px solid; COLOR: #99210b; MARGIN-RIGHT: 3px; PADDING-TOP: 2px; BORDER-BOTTOM: #dedfde 1px solid; TEXT-DECORATION: none } .megas512 A:hover { BORDER-RIGHT: #000 1px solid; BORDER-TOP: #000 1px solid; BACKGROUND-IMAGE: none; BORDER-LEFT: #000 1px solid; COLOR: #fff; BORDER-BOTTOM: #000 1px solid; mso-para-margin-bottom:0.0000gd;text-align:left;">} .megas512 A:active { BORDER-RIGHT: #000 1px solid; BORDER-TOP: #000 1px solid; BACKGROUND-IMAGE: none; BORDER-LEFT: #000 1px solid; COLOR: #fff; BORDER-BOTTOM: #000 1px solid; mso-para-margin-bottom:0.0000gd;text-align:left;">} .megas512 SPAN.current { PADDING-RIGHT: 6px; PADDING-LEFT: 6px; FONT-WEIGHT: bold; PADDING-BOTTOM: 2px; COLOR: #99210b; MARGIN-RIGHT: 3px; PADDING-TOP: 2px } .megas512 SPAN.disabled { PADDING-RIGHT: 6px; PADDING-LEFT: 6px; PADDING-BOTTOM: 2px; COLOR: #adaaad; MARGIN-RIGHT: 3px; PADDING-TOP: 2px }
/*CSS technorati style pagination*/ .technorati { PADDING-RIGHT: 3px; PADDING-LEFT: 3px; PADDING-BOTTOM: 3px; MARGIN: 3px; PADDING-TOP: 3px; TEXT-ALIGN: center } .technorati A { BORDER-RIGHT: #ccc 1px solid; PADDING-RIGHT: 6px; BACKGROUND-POSITION: 50% bottom; BORDER-TOP: #ccc 1px solid; PADDING-LEFT: 6px; FONT-WEIGHT: bold; PADDING-BOTTOM: 2px; BORDER-LEFT: #ccc 1px solid; COLOR: rgb(66,97,222); MARGIN-RIGHT: 3px; PADDING-TOP: 2px; BORDER-BOTTOM: #ccc 1px solid; TEXT-DECORATION: none } .technorati A:hover { BACKGROUND-IMAGE: none; COLOR: #fff; mso-para-margin-bottom:0.0000gd;text-align:left;">} .technorati A:active { BACKGROUND-IMAGE: none; COLOR: #fff; mso-para-margin-bottom:0.0000gd;text-align:left;">} .technorati SPAN.current { PADDING-RIGHT: 6px; PADDING-LEFT: 6px; FONT-WEIGHT: bold; PADDING-BOTTOM: 2px; COLOR: #000; MARGIN-RIGHT: 3px; PADDING-TOP: 2px } .technorati SPAN.disabled { DISPLAY: none }
/*CSS youtube style pagination*/ .youtube { PADDING-RIGHT: 6px; BORDER-TOP: #9c9a9c 1px dotted; PAD
赞 (0)
打赏
微信扫一扫
相关文章:
版权声明:本文内容由互联网用户贡献,该文观点仅代表作者本人。本站仅提供信息存储服务,不拥有所有权,不承担相关法律责任。 如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至 2386932994@qq.com 举报,一经查实将立刻删除。 |
上一篇: C# AutoMapper的简单扩展
下一篇: C# Winform右下角弹窗方式
发表评论