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

Two example effects of CSS3 text

高洛峰
Release: 2017-03-27 10:19:25
Original
2202 people have browsed it

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

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

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!

Related labels:
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