CSS3文字的描边镂空效果

快乐打工仔 分类:实例代码

CSS3文字的描边镂空效果属于前端实例代码,有关更多实例代码大家可以查看

本文分享一段代码实例,它利用CSS3实现了文本的描边镂空效果。

代码实例如下:

<!DOCTYPE html>
<html>
<head>
<meta charset=" utf-8">
<meta name="author" content="http://www.pipipi.net/" />
<title>前端教程网</title>
<style type="text/css">
.blackandwhite{
  font-family: '微软雅黑';
  font-size:3em;
  color:green;
  text-align:center;
  -webkit-text-fill-color:white;
  -webkit-text-stroke:2px black;
}
</style>
</head> 
<body> 
<div class="blackandwhite">前端教程网欢迎您</div>
</body> 
</html>

CSS3文字的描边镂空效果,这样的场景在实际项目中还是用的比较多的,关于CSS3文字的描边镂空效果就介绍到这了。

回复

我来回复
  • 暂无回复内容