Is there text stroke in css style?

WBOY
Release: 2021-12-10 10:26:48
Original
2140 people have browsed it

In css style, there is text stroke style. You can use the "text-stroke" attribute to set the stroke style for text elements. This attribute can set the thickness and color of the text stroke. The syntax is "text element {text-stroke:width color;}".

Is there text stroke in css style?

The operating environment of this tutorial: Windows 10 system, CSS3&&HTML5 version, Dell G3 computer.

Is there text stroke in css style?

Is there text stroke in css style?

In CSS, you can use the text-stroke attribute to set the stroke style for text. This attribute is a composite attribute. Sets or retrieves the stroke of text in an object.

can also be written separately, text-stroke-width: sets or retrieves the stroke thickness of the text in the object, text-stroke-color: sets or retrieves the stroke color of the text in the object.

Writing:

Is there text stroke in css style?

The example is as follows:

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
  <style>
    p{
      font-size:50px;
      -webkit-text-stroke:1px red;
    }
  </style>
</head>
<body>
  <p>css样式中有文字描边</p>
</body>
</html>
Copy after login

Output result:

Is there text stroke in css style?

If you are interested, you can continue to visit: css video tutorial.

The above is the detailed content of Is there text stroke in css style?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
css
source:php.cn
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