Home >Web Front-end >CSS Tutorial >Create white text with black shadow using CSS

Create white text with black shadow using CSS

王林
王林forward
2023-08-30 21:53:021064browse

使用 CSS 创建带有黑色阴影的白色文本

Use the text-shadow property to create white text with a black shadow.

You can try running the following code to implement the text-shadow property:

>

Example

Live demonstration

<!DOCTYPE html>
<html>
   <head>
      <style>
         h1 {
            color: white;
            text-shadow: 3px 3px 3px #000000;
         }
      </style>
   </head>
   <body>
      <h1>Heading One</h1>
      <p>Above heading has a text shadow effect.<p>
   </body>
</html>

The above is the detailed content of Create white text with black shadow using CSS. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:tutorialspoint.com. If there is any infringement, please contact admin@php.cn delete