Page Widget How to - Create CSS3 Text-Stroke with transparent color








Question

We would like to know how to create CSS3 Text-Stroke with transparent color.

Answer


<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
.stroke-transparent {<!--  w w  w .ja  v  a2s. c o  m-->
  -webkit-text-stroke: 1px #000;
  -webkit-text-fill-color: transparent;
}
</style>
</head>
<body>
  <h2 class="stroke-transparent">This is what stroked text looks
    like with a transparent fill and a 1px stroke.</h2>
</body>
</html>

The code above is rendered as follows: