- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>文字阴影</title>
- <style type="text/css">
- <!--
- #father{
- margin:15px;
- font-family:黑体;
- font-size:60px;
- font-weight:bold;
- position:relative;
- }
- #word{
- position:absolute;
- z-index:1;
- color:red;
- }
- #shadow{
- color:#AAAAAA;
- position:absolute;
- top:4px;
- left:4px;
- z-index:0;
- }
- -->
- </style>
- </head>
- <body>
- <div id="father">
- <div id="word">好好学习</div>
- <div id="shadow">好好学习</div>
- </div>
- </body>
- </html>
-
[Web前端技术教学]实现文字阴影
最新推荐文章于 2022-09-11 12:10:33 发布