您的位置:首页 > Web前端 > CSS

css设置表格的边框为实线还是虚线,+鼠标悬停显示提示字

2011-06-24 14:13 916 查看
虚线

在css里面添加
<style>
td {border-bottom:1px dashed #000000;}
</style>

实线

在css里面添加
<style>
td {border:1px solid black;}
</style>

-------------------------------------------------------------------
去掉链接的下划线,并设定字体的颜色

A:link            {   text-decoration:none;   color:#你想要的颜色;}

A:visited   {   text-decoration:none;   color:#你想要的颜色;}

A:hover         {   text-decoration:none;   color:#你想要的颜色;}

A:active      {   text-decoration:none;   color:#你想要的颜色;}

</style>
-------------------------------------------------------------------------

鼠标悬停提示效果,将下面的代码copy到一个文本文件中保存为xx.html,打开就可以看到效果了。

<a class="tooltips" href="#">鼠标移到这里看看吧<span>我是该连接的文字说明,效果是不是很好呢?</span></a>

<style type="text/css">  /*Tooltips*/

.tooltips{  position:relative; /*这个是关键*/

z-index:2;  }  .tooltips:hover{  z-index:3;  background:none; /*没有这个在IE中不可用*/

}  .tooltips span{  display: none;  }  .tooltips:hover span{ /*span 标签仅在 :hover 状态时显示*/

display:block;  position:absolute;  top:21px;  left:9px;  width:15em;  border:1px solid black;  background-color:#ccFFFF;  padding: 3px;  color:black;  }

</style>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: