Home  >  Article  >  Web Front-end  >  How to set font shadow in css

How to set font shadow in css

王林
王林Original
2020-11-23 11:22:0712620browse

How to set font shadow in css: use the code [text-shadow:3px 3px 3px #00f;], the [text-shadow] attribute is applied to the shadow text, the syntax is [text-shadow: h-shadow v -shadow blur color;].

How to set font shadow in css

The operating environment of this tutorial: Windows 10 system, CSS3 version. This method is suitable for all brands of computers.

(Learning video sharing: css video tutorial)

How to set font shadow in css:

Related attributes:

text-shadow property applies to shadow text.

Syntax:

text-shadow: h-shadow v-shadow blur color;

Attribute value:

  • h-shadow Required. The position of the horizontal shadow. Negative values ​​are allowed.

  • v-shadow Required. The position of the vertical shadow. Negative values ​​are allowed.

  • blur Optional. Blurred distance.

  • #color Optional. The color of the shadow.

Example:

<!doctype html>
<html>
<head>
    <meta charset="UTF-8">
    <title>index</title>
    <style>
        *{
            font-family: 微软雅黑;
        }

        p{
            text-shadow:3px 3px 3px #00f;
        }
    </style>
</head>
<body>
    <div>
        <p>linux is very much!</p>
        <p>linux is very much!</p>
        <p>linux is very much!</p>
        <p>linux is very much!</p>
        <p>linux is very much!</p>
    </div>
</body>
</html>

Related recommendations:CSS tutorial

The above is the detailed content of How to set font shadow in css. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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