启点在线企业网站
启点在线网站管理
启点在线企业网站
启点在线企业网站
启点在线企业网站
视觉设计 - 首页 •
用CSS实现分页居中/圆角宽度自适
发布日期:2015-7-27 14:19:47

实现功能:
分页单个链接可用圆角图片,实现自适应宽度功能。
分页可由父层的text-align属性定义对齐方式。
主要属性:
display:inline-block

用到的图片: 
 


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<FCK:meta http-equiv="Content-Type" content="text/html; charset=utf-8"  />
<title></title>
<style type="text/css">
*{margin:0; padding:0;}
body{padding:20px; text-align:center;}
.cutpage{font-size:12px; font-family:Tahoma;}
.cutpage a{display:inline-block; background:url(http://www.16sucai.com//uploadfile/file/01.png) left top no-repeat; height:17px; padding-left:5px; line-height:17px; text-decoration:none; margin:3px 3px 3px 0; vertical-align:middle;}
.cutpage a span{ background:url(http://www.16sucai.com//uploadfile/file/01.png) right top no-repeat; padding-right:5px; display:inline-block; cursor:pointer; height:17px; line-height:17px;}
.cutpage a.current{background:url(http://www.16sucai.com//uploadfile/file/01.png) left -17px no-repeat;}
.cutpage a.current span{background:url(http://www.16sucai.com//uploadfile/file/01.png) right -17px no-repeat;}
.cutpage a:link,.cutpage a:visited{color:#999;}
.cutpage a:hover{background-position:left -17px; color:#fff;}
.cutpage a.current:hover{color:#fff;}
.cutpage a:hover span{background-position:right -17px;}
.cutpage a.current:link,.cutpage a.current:visited{color:#fff;}
</style>
</head>
<body>
<div style="width:300px; margin:0 auto;">
<div class="cutpage" id="page">
<a href="#" _fcksavedurl="#"><span>上一页</span></a><a href="#" _fcksavedurl="#" class="current" id="cutpage"><span>1</span></a><a href="#" _fcksavedurl="#"><span>2</span></a><a href="#" _fcksavedurl="#"><span>3</span></a><a href="#" _fcksavedurl="#"><span>4</span></a><a href="#" _fcksavedurl="#"><span>3</span></a><a href="#" _fcksavedurl="#"><span>4</span></a><a href="#" _fcksavedurl="#"><span>5</span></a><a href="#" _fcksavedurl="#"><span>6</span></a><a href="#" _fcksavedurl="#"><span>7</span></a><a href="#" _fcksavedurl="#"><span>8</span></a><a href="#" _fcksavedurl="#"><span>9</span></a><a href="#" _fcksavedurl="#"><span>10</span></a><a href="#" _fcksavedurl="#"><span>11</span></a><a href="#" _fcksavedurl="#"><span>14</span></a><a href="#" _fcksavedurl="#"><span>124</span></a><a href="#" _fcksavedurl="#"><span>下一页</span></a>
</div>
</div>
<p></p>
<p></p>
</body>
</html>


关于我们 新闻中心 成功案例 产品中心 下载中心 网站地图 关注我们








扫一扫
TOP
LINKS: 启点在线 |  A5源码 |  ASP集中营 |  WEB元素 |  deviantart | 
Kdesign-The official website ADD:CHINA·GUANGDONG  TEL:Contact our QQ  FAX:Contact our QQ
COPYRIGHT 2017 KDESIGN™ Design:Kelvinvt ALL RIGHTS RESERVED.  ICP:14066162
 kelvinvt  kelvinvt  在线客服
TOP
Scan the QR code