45IT.COM- 电脑学习从此开始!
DIY硬件教程攒机经验装机配置
设计Photoshop网页设计特效
系统注册表DOS系统命令其它
存储主板显卡外设键鼠内存
维修显卡CPU内存打印机
WinXPVistaWin7unix/linux
CPU光驱电源/散热显示器其它
修技主板硬盘键鼠显示器光驱
办公ExcelWordPowerPointWPS
编程数据库CSS脚本PHP
网络局域网QQ服务器
软件网络系统图像安全
页面导航: 首页 > 设计学院 > 网络编程 > CSS教程 >

CSS图片分割调用技巧示例代码

电脑软硬件应用网 45IT.COM 时间:2008-11-26 13:43 作者:转载未知

通过这种方式可以把N多个小图标放进一张图里,一起进缓存,调用的快了,特别是鼠标经过换图片。


我喜欢这样弄!

以下是HTML网页特效代码:

<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style type="text/css">
<!--
#prev:hover {
background:transparent url(
http://www.w3school.com.cn/i/site_prenext.gif
) no-repeat scroll 0 -21px;
}
#next:hover {
background:transparent url(
http://www.w3school.com.cn/i/site_prenext.gif
) no-repeat scroll -125px -21px;
}
-->
</style>
</head>
<body><div style="background:transparent url(
http://www.w3school.com.cn/i/site_prenext.gif
) no-repeat scroll 0 0; width:230px; height:21px;">
<a id="prev" style="width:105px; height:21px; float:left; text-indent:-9999px;" href="#">上一页</a>
<a id="next" style="width:105px; height:21px; float:right; text-indent:-9999px;" href="#">下一页</a>
</div>
</body>
</html>

顶一下
(1)
100%
踩一下
(0)
0%
------分隔线----------------------------
无法在这个位置找到: baidushare.htm
发表评论
请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
评价:
表情:
验证码:点击我更换图片
推荐知识