当前位置:Gxlcms > css > CSS3文本两种实例效果

CSS3文本两种实例效果

时间:2021-07-01 10:21:17 帮助过:46人阅读

CSS3文本效果实例1:

文本阴影:

<!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>

实例二:CSS3自动换行

<!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>

以上就是CSS3文本两种实例效果的详细内容,更多请关注Gxl网其它相关文章!

人气教程排行