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








Question

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

Answer


<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
.stroke {<!--  w w w  .j a va 2  s .co m-->
  color: #c00;
  -webkit-text-stroke: 1px #000;
}

</style>
</head>
<body>
  <h1 class="stroke">This is what text with a stroke looks like, red
    text with a 1px stroke.</h1>
</body>
</html>

The code above is rendered as follows: