Discuz!官方免费开源建站系统

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

CSS显示你个性的鼠标指针

[复制链接]
shengda987 发表于 2007-10-8 23:51:14 | 显示全部楼层 |阅读模式
首先,你需要一个鼠标指针文件,可以通过单击“开始”→点击“查找”→键入“.ani”或“.cur”(不含双引号),也可以到网上下载你喜欢的指针。注:.ani是动态效果的指针文件;.cur 是静态效果的指针文件。

  下面是两种实现个性鼠标的方法。
  1.定义所有超链接的指针

  把cursor:url(指针文件的路径)加入到超链接的CSS文件中。
  如:a {color:#000000; cursor:url(指针文件的路径);} 

  2.定义个别链接的指针

  把style="cursor:url(指针文件的路径)"放进<a>的容器中。
  如:<a href="指定链接地址" style="cursor:url(指针文件的路径)">链接文字</a>

  现在保存文件,预览一下你网页的个性鼠标指针吧
 楼主| shengda987 发表于 2007-10-8 23:51:43 | 显示全部楼层

CSS实现简单的图片防盗链代码

实现方法很简单,在CSS中添加以下代码:

img {
filter:expression(
this.不能去掉 ? "" :
(
(!this.complete) ? "" :
this.runtimeStyle.filter = ("progidXImageTransform.Microsoft.AlphaImageLoader(src='" + this.src + "')") +
String(this.不能去掉 = true).substr(0, 0) +
(this.src = "/Upfiles/BeyondPic/2007-08/20078291317340628.gif").substr(0, 0)
)
);
}


  然后修改下上面的图片路径,随便找个乱七八糟的图放上去,就OK.另存起来还是有点头疼的,要看源代码才行.
回复

使用道具 举报

 楼主| shengda987 发表于 2007-10-8 23:52:09 | 显示全部楼层

用CSS做滑动效果的图片画廊

<style>
#galleryh {
  padding:0;
  margin:0 auto 5em auto;
  list-style-type:none;
  overflow:hidden;
  width:495px;
  height:240px;
  border:1px solid #888;
  background:#fff url(/Upfiles/BeyondPic/2007-09/20079296885656682.gif);
  }
#galleryh li {
  float:left;
  }
#galleryh li a {
  display:block;
  height:240px;
  width:28px;
  float:left;
  text-decoration:none;
  border-right:1px solid #fff;
  cursor:default;
  }
#galleryh li a img {
  width:28px;
  height:240px;
  border:0;
  }
#galleryh li a:hover {
  background:#eee;
  width:320px;
  }
#galleryh li a:hover img {
  width:320px;
  }
</style>
<ul id="galleryh">
<li><a href="#nogo">
<img src="/Upfiles/BeyondPic/2007-09/20079294012285903.jpg" alt="#1" title="#1" /></a></li>
<li><a href="#nogo">
<img src="/Upfiles/BeyondPic/2007-09/20079293310680905.jpg" alt="#2" title="#2" /></a></li>
<li><a href="#nogo">
<img src="/Upfiles/BeyondPic/2007-09/20079296651862457.jpg" alt="#3" title="#3" /></a></li>
<li><a href="#nogo">
<img src="/Upfiles/BeyondPic/2007-09/20079299611942077.jpg" alt="#4" title="#4" /></a></li>
<li><a href="#nogo">
<img src="/Upfiles/BeyondPic/2007-09/20079291710926592.jpg" alt="#5" title="#5" /></a></li>
<li><a href="#nogo">
<img src="/Upfiles/BeyondPic/2007-09/20079291265795941.jpg" alt="#6" title="#6" /></a></li>
<li><a href="#nogo">
<img src="/Upfiles/BeyondPic/2007-09/20079291706613235.jpg" alt="#7" title="#7" /></a></li>
</ul>


="/Upfiles/BeyondPic/2007-09/20079291706613235.jpg其中的这些是图片地址.自己修改下就行了 
回复

使用道具 举报

 楼主| shengda987 发表于 2007-10-8 23:53:01 | 显示全部楼层

纯CSS制作下拉导航菜单实例代码

<style type="text/css">
.menu {
font-family: verdana, sans-serif;
width:750px;
position:relative;
font-size:0.85em;
padding-bottom:250px;
}
.menu ul {
padding:0;
margin:0;
list-style-type: none;
}
.menu ul li {
float:left;
position:relative;
}
.menu ul li a, .menu ul li a:visited {
display:block;
text-decoration:none;
color:#000;
width:139px;
height:3em;
color:#000;
border:1px solid #fff;
border-width:1px 1px 0 0;
background:#dfc184;
padding-left:10px;
line-height:3em;
}
* html .menu ul li a, .menu ul li a:visited {
width:149px;
w\idth:139px;
}
.menu ul li ul {
display: none;
}
table {
margin:-1px;
border-collapse:collapse;
font-size:1em;
}
/* specific to non IE browsers */
.menu ul li:hover a {
color:#fff;
background:#bd8d5e;
}
.menu ul li:hover ul {
display:block;
position:absolute;
top:3em;
margin-top:1px;
left:0;
width:150px;
}
.menu ul li:hover ul li ul {
display: none;
}
.menu ul li:hover ul li a {
display:block;
background:#faeec7;
color:#000;
height:auto;
line-height:1.2em;
padding:5px 10px;
width:129px
}
.menu ul li:hover ul li a.drop {
background:#c9c9a7 url(../../graphics/drop.gif) bottom right no-repeat;
}
.menu ul li:hover ul li a:hover {
background:#c9c9a7;
color:#000;
}
.menu ul li:hover ul li:hover ul {
display:block;
position:absolute;
left:150px;
top:0;
width:150px;
}
.menu ul li:hover ul li:hover ul.left {
left:-150px;
}
</style>
<!--[if lte IE 6]>
<style type="text/css">
.menu ul li a:hover {
color:#fff;
background:#bd8d5e;
}
.menu ul li a:hover ul {
display:block;
position:absolute;
top:3em;
left:0;
background:#fff;
margin-top:0;
marg\in-top:1px;
}
.menu ul li a:hover ul li a {
display:block;
background:#dbe4ab;
color:#000;
height:auto;
line-height:1.5em;
padding:5px 10px;
width:150px;
w\idth:129px;
}
.menu ul li a:hover ul li a.drop {
background:#c9c9a7 url(../../graphics/drop.gif) bottom right no-repeat;
}
.menu ul li a:hover ul li a ul {
visibility:hidden;
position:absolute;
height:0;
width:0;
}
.menu ul li a:hover ul li a:hover {
background:#c9c9a7; color:#000;
}
.menu ul li a:hover ul li a:hover ul {
visibility:visible;
position:absolute;
top:0;
color:#000;
left:150px;
}
.menu ul li a:hover ul li a:hover ul.left {
left:-150px;
}
</style>
<![endif]-->
<div class="menu">
<ul>
<li><a class="drop" href="../menu/index.html">DEMOS
<!--[if IE 7]><!-->
</a>
<!--<![endif]-->
<table><tr><td>
    <ul>
    <li><a href="../menu/zero_dollars.html" title="The zero dollar ads page">zero dollars advertising page</a></li>
    <li><a href="../menu/embed.html" title="Wrapping text around images">wrapping text around images</a></li>
    <li><a href="../menu/form.html" title="Styling forms">styled form</a></li>
    <li><a href="../menu/nodots.html" title="Removing active/focus borders">active focus</a></li>
    <li><a class="drop" href="../menu/hover_click.html" title="Hover/click with no active/focus borders">hover/click with no borders
<!--[if IE 7]><!-->
</a>
<!--<![endif]-->
<table><tr><td>
        <ul>
            <li><a href="../menu/form.html" title="Styling forms">styled form</a></li>
            <li><a href="../menu/nodots.html" title="Removing active/focus borders">removing active/focus borders</a></li>
            <li><a href="../menu/hover_click.html" title="Hover/click with no active/focus borders">hover/click</a></li>
        </ul>
</td></tr></table>
<!--[if lte IE 6]>
</a>
<![endif]-->
    </li>
    <li class="upone"><a href="../menu/shadow_boxing.html" title="Multi-position drop shadow">shadow boxing</a></li>
    <li><a href="../menu/old_master.html" title="Image Map for detailed information">image map for detailed information</a></li>
    <li><a href="../menu/bodies.html" title="fun with background images">fun with background images</a></li>
    <li><a href="../menu/fade_scroll.html" title="fade-out scrolling">fade scrolling</a></li>
    <li><a href="../menu/em_images.html" title="em size images compared">em image sizes compared</a></li>
    </ul>
</td></tr></table>
<!--[if lte IE 6]>
</a>
<![endif]-->
</li>
<li><a href="../boxes/index.html">BOXES
<!--[if IE 7]><!-->
</a>
<!--<![endif]-->
<table><tr><td>
    <ul>
    <li><a href="spies.html" title="a coded list of spies">a coded list of spies</a></li>
    <li><a href="vertical.html" title="a horizontal vertical menu">vertical menu</a></li>
    <li><a href="expand.html" title="an enlarging unordered list">enlarging unordered list</a></li>
    <li><a href="enlarge.html" title="an unordered list with link images">link images</a></li>
    <li><a href="cross.html" title="non-rectangular links">non-rectangular</a></li>
    <li><a href="jigsaw.html" title="jigsaw links">jigsaw links</a></li>
    <li><a href="circles.html" title="circular links">circular links</a></li>
    </ul>
</td></tr></table>
<!--[if lte IE 6]>
</a>
<![endif]-->
</li>
<li><a href="../mozilla/index.html">MOZILLA
<!--[if IE 7]><!-->
</a>
<!--<![endif]-->
<table><tr><td>
    <ul>
    <li><a href="../mozilla/dropdown.html" title="A drop down menu">drop down menu</a></li>
    <li><a href="../mozilla/cascade.html" title="A cascading menu">cascading menu</a></li>
    <li><a href="../mozilla/content.html" title="Using content:">content:</a></li>
    <li><a href="../mozilla/moxbox.html" title=":hover applied to a div">mozzie box</a></li>
    <li><a href="../mozilla/rainbow.html" title="I can build a rainbow">I can build a rainbow with transparent borders</a></li>
    <li><a href="../mozilla/snooker.html" title="Snooker cue">a snooker cue using border art</a></li>
    <li><a href="../mozilla/target.html" title="Target Practise">target practise</a></li>
    <li><a href="../mozilla/splittext.html" title="Two tone headings">two tone headings</a></li>
    <li><a href="../mozilla/shadow_text.html" title="Shadow text">shadow text</a></li>
    </ul>
</td></tr></table>
<!--[if lte IE 6]>
</a>
<![endif]-->
</li>
<li><a href="../ie/index.html">EXPLORER
<!--[if IE 7]><!-->
</a>
<!--<![endif]-->
<table><tr><td>
    <ul>
    <li><a href="../ie/exampleone.html" title="Example one">the first example for Internet Explorer</a></li>
    <li><a href="../ie/weft.html" title="Weft fonts">weft fonts</a></li>
    <li><a href="../ie/exampletwo.html" title="Vertical align">vertically aligning text</a></li>
    </ul>
</td></tr></table>
<!--[if lte IE 6]>
</a>
<![endif]-->
</li>
<li><a href="../opacity/index.html">OPACITY
<!--[if IE 7]><!-->
</a>
<!--<![endif]-->
<table><tr><td>
    <ul>
    <li><a href="../opacity/colours.html" title="colour wheel">a colour wheel using opaque colours</a></li>
    <li><a href="../opacity/picturemenu.html" title="a menu using opacity">a menu using opacity</a></li>
    <li><a href="../opacity/png.html" title="partial opacity">partial opacity</a></li>
    <li><a href="../opacity/png2.html" title="partial opacity II">partial opacity II</a></li>
    <li><a class="drop" href="../menu/hover_click.html" title="Hover/click with no active/focus borders">HOVER/CLICK
<!--[if IE 7]><!-->
</a>
<!--<![endif]-->
<table><tr><td>
        <ul class="left">
            <li><a href="../menu/form.html" title="Styling forms">styled form</a></li>
            <li><a href="../menu/nodots.html" title="Removing active/focus borders">removing active/focus borders</a></li>
            <li><a href="../menu/hover_click.html" title="Hover/click with no active/focus borders">hover/click</a></li>
        </ul>
</td></tr></table>
<!--[if lte IE 6]>
</a>
<![endif]-->
    </li>
    </ul>
</td></tr></table>
<!--[if lte IE 6]>
</a>
<![endif]-->
</li>
</ul>
</div>
回复

使用道具 举报

 楼主| shengda987 发表于 2007-10-8 23:53:48 | 显示全部楼层

完全用CSS实现的中英文双语导航菜单

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="Keywords" content="bilingual menu,中英文双语菜单" />
<meta http-equiv="Description" content="完全用CSS实现的中英文双语导航菜单" />
<meta content="all" name="robots" />
<meta http-equiv="pragma" content="no-cache" />
<meta name="author" content="forestgan" />
<meta name="copyright" content="forestgan" />
<title>完全用CSS实现的中英文双语导航菜单</title>
<style type="text/css">
a{
color: #FFFF99;
text-decoration: none;
}
a:hover{
color: #FFFFFF;
text-decoration: underline;
}
#nav{
padding: 10px 10px 0;
font-size: 12px;
font-weight: bold;
margin: 1em 0 0;
list-style:none;
}
#nav li{
float: left;
margin-right: 1px;
}
.bi{
position: relative;
z-index: 0;
}
.bi:hover{
z-index: 99;
}
.bi:hover span{
visibility: visible;
top: 0;
left: 0;
cursor: pointer;
}
.bi span{
position: absolute;
left: -999em;
visibility: hidden;
}
#nav li a,.bi:hover span{
line-height: 20px;
text-decoration: none;
background: #DDDDDD;
color: #666666;
display: block;
width: 80px;
text-align: center;
}
#nav li a:hover,.bi:hover span{
color: #FFFFFF;
background: #DC4E1B;
}
.bi:hover span{
padding-top: 2px;
}
#navbar{
background: #DC4E1B;
height: 8px;
overflow: hidden;
clear: both;
}
</style>
<link href="../css/main.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top">
  <ul id="nav">
  <li><a class="bi" href="index.html">Home<span>首 页</span></a></li>
  <li><a class="bi" href="about.html">About us<span>关于我们</span></a></li>
  <li><a class="bi" href="products.html">Products<span>产品展示</span></a></li>
  <li><a class="bi" href="services.html">Services<span>售后服务</span></a></li>
  <li><a class="bi" href="contact.html">Contact<span>联系我们</span></a></li>
</ul>
<div id="navbar"></div>
</div>
<div id="footer">
  <address>
  Design by <a href="http://www.forest53.com">forestgan</a> 本演示采用<a href="http://www.creativecommons.cn/">创作共用授权</a>--署名和非商业用途。  <a href="javascript:history.back()">Back</a>
  </address>
</div>
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "UA-152060-1";
urchinTracker();
</script>
<noscript>google-analytics</noscript>
<script src="http://www.forest53.com/stat/mystat.asp?siteid=1" type="text/javascript"></script>
<noscript>stat.</noscript>
</body>
</html>
回复

使用道具 举报

 楼主| shengda987 发表于 2007-10-8 23:54:10 | 显示全部楼层

完全用CSS实现的中英文双语导航菜单

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="Keywords" content="bilingual menu,中英文双语菜单" />
<meta http-equiv="Description" content="完全用CSS实现的中英文双语导航菜单" />
<meta content="all" name="robots" />
<meta http-equiv="pragma" content="no-cache" />
<meta name="author" content="forestgan" />
<meta name="copyright" content="forestgan" />
<title>完全用CSS实现的中英文双语导航菜单</title>
<style type="text/css">
a{
color: #FFFF99;
text-decoration: none;
}
a:hover{
color: #FFFFFF;
text-decoration: underline;
}
#nav{
padding: 10px 10px 0;
font-size: 12px;
font-weight: bold;
margin: 1em 0 0;
list-style:none;
}
#nav li{
float: left;
margin-right: 1px;
}
.bi{
position: relative;
z-index: 0;
}
.bi:hover{
z-index: 99;
}
.bi:hover span{
visibility: visible;
top: 0;
left: 0;
cursor: pointer;
}
.bi span{
position: absolute;
left: -999em;
visibility: hidden;
}
#nav li a,.bi:hover span{
line-height: 20px;
text-decoration: none;
background: #DDDDDD;
color: #666666;
display: block;
width: 80px;
text-align: center;
}
#nav li a:hover,.bi:hover span{
color: #FFFFFF;
background: #DC4E1B;
}
.bi:hover span{
padding-top: 2px;
}
#navbar{
background: #DC4E1B;
height: 8px;
overflow: hidden;
clear: both;
}
</style>
<link href="../css/main.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top">
  <ul id="nav">
  <li><a class="bi" href="index.html">Home<span>首 页</span></a></li>
  <li><a class="bi" href="about.html">About us<span>关于我们</span></a></li>
  <li><a class="bi" href="products.html">Products<span>产品展示</span></a></li>
  <li><a class="bi" href="services.html">Services<span>售后服务</span></a></li>
  <li><a class="bi" href="contact.html">Contact<span>联系我们</span></a></li>
</ul>
<div id="navbar"></div>
</div>
<div id="footer">
  <address>
  Design by <a href="http://www.forest53.com">forestgan</a> 本演示采用<a href="http://www.creativecommons.cn/">创作共用授权</a>--署名和非商业用途。  <a href="javascript:history.back()">Back</a>
  </address>
</div>
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "UA-152060-1";
urchinTracker();
</script>
<noscript>google-analytics</noscript>
<script src="http://www.forest53.com/stat/mystat.asp?siteid=1" type="text/javascript"></script>
<noscript>stat.</noscript>
</body>
</html>
回复

使用道具 举报

9so 发表于 2007-10-9 00:10:53 | 显示全部楼层
哈哈  不错啊
回复

使用道具 举报

北流女性频道 发表于 2007-10-9 00:19:11 | 显示全部楼层
值得收藏
回复

使用道具 举报

xuanzu 发表于 2007-10-9 01:00:38 | 显示全部楼层

好东东,我   都找好久了哦。。。。
回复

使用道具 举报

goagrass 发表于 2008-4-25 11:01:29 | 显示全部楼层
玩转CSS - CSSPLAY中文官方网站 一个致力于中国CSS技术的公益组织
http://www.cssplay.org.cn/

在玩转CSS(CssPlay)你可以学习到最全面的CSS技术,提供CSS教程资料,CSS导航,CSS样式代码,CSS菜单,CSS布局实例,CSS模板下载,CSS酷站欣赏,CSS在线手册,web标准教程,xhtml与css学习,欢迎进入玩转CSS(CssPlay)!
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2024-11-18 21:45 , Processed in 0.051238 second(s), 4 queries , Gzip On, Redis On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表