网页设计与网站建设基础心得体会,wordpress 律所,济南成之运维网络科技,中小企业网上申报系统CSS设置字体白色描边1、使用text-stroke属性text-stroke属性用于向文本添加描边。此属性可用于更改文字的描边宽度和颜色。使用-webkit-前缀支持此属性。text-stroke是text-stroke-width和text-stroke-color(给文本填充颜色)两个属性的简写。语法#xff1a;text-stroke: ;参数…CSS设置字体白色描边1、使用text-stroke属性text-stroke属性用于向文本添加描边。此属性可用于更改文字的描边宽度和颜色。使用-webkit-前缀支持此属性。text-stroke是text-stroke-width和text-stroke-color(给文本填充颜色)两个属性的简写。语法text-stroke: ;参数width设置文字的描边厚度color设置文字的描边颜色示例import url(https://fonts.googleapis.com/css?familyBangers);body {font-size: 50%;line-height: 1;background: palevioletred;}h1 {font: 8em/1 Bangers, sans-serif;-webkit-text-stroke: 3px #fff;color:black;}Hello World效果图2、使用text-shadow属性text-shadow:向文本设置阴影。text-shadow:color||length||length||opacity。color:指定颜色。length:第一个length指定阴影在水平方向上的延伸距离第二个length指定阴影在垂直方向上的延伸距离可以为负值。opacity:指定阴影模糊效果的作用距离。用逗号分隔的4个属性值代表的方向顺序为右下左上。示例text-shadow-文字描边.demo {height: 200px;text-align: center;font-family: Verdana;font-size: 30px;font-weight: bold;background: peru;color: #000;}.stroke {text-shadow: #fff 1px 0 0, #fff 0 1px 0, #fff -1px 0 0, #fff 0 -1px 0;}没有添加描边添加了字体描边效果图