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

Create white text with black shadow using CSS

王林
Release: 2023-08-30 21:53:02
forward
1067 people have browsed it

使用 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>
Copy after login

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!

source:tutorialspoint.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template