PHP8.1.21版本已发布
vue8.1.21版本已发布
jquery8.1.21版本已发布

css滤镜实现文字描边效果(不支持FF与IE6)

原创
2016-05-16 12:06:59 1623浏览

心得: css滤镜效果虽然好看好用,但是不实用于网页制作中,因为它不支持FF与IE6,美工们最好不要用于网页制作中, 那样会降低自己的技术含量.

方法1:

<span style="position:absolute;width:150;filter:shadow(color=orange);font-size:45pt;color:yellow">文字</span>

方法2:

<p style="font-size:12px;height:12px;color:white;filter:glow(color=black,strength=1);">Text描边字</p>

方法3:

<style. type="text/css">
body {font:12px "Verdana";filter:alpha(style=1,startY=0,finishY=100,startX=100,finishX=100);background-color:#3366cc;}
span {
      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);
}
#english {
      font-size:14px;}
</style>
<span id="english">This is the prospect of filter - dropshadow.</span><span>中文描边效果</span>
.font {
         font-family: "新宋体";
          font-size: 12px;
          font-style. normal;
          color: #FFFF00;
          padding:1px;
          letter-spacing: 2px;
         
    filter:
         Dropshadow(offx=1,offy=0,color=black)
          Dropshadow(offx=0,offy=1,color=black)
          Dropshadow(offx=0,offy=-1,color=black)
          Dropshadow(offx=-1,offy=0,color=black);
}

方法4:

#text { float:left; color:#C60A12; 
filter:Dropshadow(offx=1,offy=0,color=#ffffff) 
Dropshadow(offx=0,offy=1,color=#ffffff) 
Dropshadow(offx=-1,offy=0,color=#ffffff) 
Dropshadow(offx=0,offy=-1,color=#ffffff);
}

此效果是用css的阴影滤镜来实现,普通的阴影滤镜只会产生一个方向的投影,在这里定义了四个方向的投影,所以产生了描边的效果。

<p style="font-size:12px;height:12px;color:white;filter:glow(color=black,strength=1);">Text描边字</p>
声明:本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn核实处理。