·天新网首页·加入收藏·设为首页
首页|笔记本|手机|数码相机|摄像机|MP3/MP4|主板|内存|显示器|办公|打印机|下载|开发|汽车|学院|业界
硬件|台式机|数码|数字家庭|投影仪|GPS/CPU|显卡|硬盘|服务器|网络|一体机|驱动|源码|游戏|考试|报价
您现在的位置:天新网 > 网络学院 > 网站建设 > HTML/CSS
用CSS样式表来定义博客上的链接样式
http://school.21tx.com 2006年11月09日 Blog

   

以下是引用片段:
<style type="text/CSS">
A { text-decoration: NONE; color:#51bfe0}
A:hover {font-weight: bold;color:#990099}
<style>

    鼠标放在链接字体上的时候,链接字体变粗,颜色改变,如本博客上的样子。其中color:#990099表示链接字体改变的颜色,可以根据个人爱好修改,其他的不需要改。

以下是引用片段:
<style type="text/css">
a{text-decoration:none; color:#51bfe0}
A:hover{font-size:23; background:#ffd306; color:#990099}
</style>

   鼠标鼠标放在链接字体上的时候,链接字体大小改变,颜色改变,有背景颜色。font-size:23表示字体大小;background:#ffd306表示背景颜色color:#990099表示字体颜色,可以根据个人爱好修改,其他的不需要改。

以下是引用片段:
<style type="text/css">
a:link{text-decoration:none}
a:hover{text-decoration:none}
a:visited{text-decoration:none}
</style>

    去掉链接字体的下划线。

以下是引用片段:
<STYLE TYPE="text/css">
A { text-decoration: NONE; color: #51bfe0}
A:hover {border-bottom:1px dashed #51bfe0 }
<style type="text/css">

    鼠标放在链接字体上的时候,链接字体加虚线。

以下是引用片段:
<style type="text/css">
A { text-decoration: NONE; color: #51bfe0}
A:hover { position: relative; left:10px; top:10px; }
</STYLE> 

  鼠标放在链接字体上的时候,链接字体会移动,其left:10px表示字体向上移动的距离,top:10px表示字体向上移动的距离,可以根据个人爱好修改具体数值,其他的不需要改。

以下是引用片段:
<style type="text/css">
a { text-decoration: none; padding-bottom: 4px; white-space: nowrap; }
a:hover { background: url(背景图片地址) repeat-x 100% 100%; }
</style> 

    鼠标放上在链接字体上的时候,链接字体出现图片背景。

以下是引用片段:
<style type="text/css">
a{ text-decoration: none; white-space: nowrap; padding-bottom: 10px; }
a:hover { background: url('http://blog.sina.com.cn/pic/4723cdbf020002nm') repeat-x 100% 100%; }
</style> 

    鼠标放在链接字体上的时候,出现花朵下划线的效果。

  注意:有些代码应该甚用,如果用不好反而会适得其反,影响页面美观效果!这些代码用的时候添加空白面板就行了。还有就是这些都是CSS代码,不能放在完全没有东西的空白面板里,可以把它放到已有内容的面板中。

上一篇: 网页制作 谈谈CSS样式表的命名规范
下一篇: 网页特效之用css样式表实现首字大写

Google
 
学院频道推荐
学院热点文章
关于我们 | 联系我们 | 广告服务 | 工作机会 | 版权声明 | 欢迎投稿 | 网站地图
Copyright © 2000-2008 , www.21tx.com , All Rights Reserved .
晨新科技 版权所有 Created by TXSite.net