需要准备的材料分别有:电脑、浏览器、html编辑器。
1、首先,打开html编辑器,新建html文件,例如:index.html。
2、在index.html中的<style>标签中,输入css代码:
body {background-color: #0b93d5text-shadow:-1px 0 white,0 1px white,1px 0 white,0 -1px white}
3、浏览器运行index.html页面,此时成功给字体添加了一个白边。
在样式表中,定义一个img
{filter:none}
这样,页面中的所有图片就不会有发光效果了!
把body的stlye属性删除掉,再把你要发光的字体加入到一个DIV
<!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/htmlcharset=gb2312" />
<title>无标题文档</title>
<style type="text/css">
body {
font-color:red
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)
}
.STYLE1 {position: absolutepadding: 4pxfilter: 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)color: #FF0000}
</style>
</head>
<body>
<br>
<div class="STYLE1">政策法规</div>
</body>
</html>