当前位置:编程学习 > html/css >>

如何用CSS控制文本字体效果

在网页设计中,如何利用CSS让字体边缘有颜色,比如字体是白色的,他的边缘颜色是黑色的?

表格外发光:

 <table border="0" style="filter:glow(color=green,strength=16);width:234;height:99;border:1 dotted red;"><tr><td> </td></tr></table>

字体外发光:
 
<!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=gb2312" />
<title>无标题文档</title>
<style type="text/css">
body {
       font:14px "Verdana";
      
       background-color:#3366cc;
}
.sizscolor {
       position:absolute;
       padding:4px;
       filter:
           Dropshadow(offx=1,offy=0,color=white)
           Dropshadow(offx=0,offy=1,color=white)
           Dropshadow(offx=0,offy=-1,color=white)
           Dropshadow(offx=-1,offy=0,color=white);
}
</style>
</head>
<body>
<br>
<div class="sizscolor ">政策法规</div>
</body>
</html>
二、如何设计网页自动改变字体颜色

回答:自动改变颜色问题,现在技术还达不到,可以使用下面代码试试:

css中 改变字体颜色

color:#000 用color属性就可以了

只听说过 用数组 设定几个颜色 然后随机调用出颜色

或者鼠标划上去,颜色改变!自动改变,还真不知道!

本文站长资源库 版权所有,未经批准转载必究

CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,