Home >Web Front-end >CSS Tutorial >Two example effects of CSS3 text

Two example effects of CSS3 text

高洛峰
高洛峰Original
2017-03-27 10:19:252251browse

CSS3 text effect example 1:

Text shadow:

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>CSS3 文本阴影</title>
<style>
h1{text-shadow: 5px 5px 5px #FF0000;}
</style>
</head>
<body>
<h1>文本阴影效果!</h1>
</body>
</html>

Example 2: CSS3 automatic line wrapping

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS3 自动换行</title>
<style> 
p.test{
width:11em;
border:1px solid #000000;
word-wrap:break-word;
}
</style>
</head>
<body>
<p class="test">This paragraph contains a very long word: thisisaveryveryveryveryveryverylongword. The long word will break and wrap to the next line.</p>
</body>
</html>

The above is the detailed content of Two example effects of CSS3 text. 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