index.html
<!DOCTYPE html> <html lang="zh-cn"> <head> <meta charset="utf-8"> <title>CSS3文本效果</title> <link rel="stylesheet" type="text/css" href="style.css"> </head> <body> <p>我是HTML5,超文本标记语言</p> </body> </html>
style.css
@charset "utf-8"; p { /*font-size: 50px;*/ /*text-shadow: 1px 1px 1px red;*/ /*text-shadow: -1px -1px 1px red;*/ /* text-shadow:0px 0px 0 rgb(188,178,188), 1px 0px 0 rgb(173,163,173), 2px 0px 0 rgb(157,147,157), 3px 0px 0 rgb(142,132,142), 4px 0px 0 rgb(126,116,126), 5px 0px 0 rgb(111,101,111), 6px 0px 0 rgb(95,85,95), 7px 0px 0 rgb(79,69,79), 8px 0px 7px rgba(0,0,0,0.35), 8px 0px 1px rgba(0,0,0,0.5), 0px 0px 7px rgba(0,0,0,0.2);*/ /*width: 160px; background-color: silver; white-space: nowrap; overflow: hidden;*/ /*text-overflow: clip;*/ /*-o-text-overflow: ellipsis; text-overflow: ellipsis;*/ font-size: 80px; /* -webkit-text-stroke: 1px red; -webkit-text-stroke-width: 3px; -webkit-text-stroke-color: orange;*/ /*color: orange;*/ /*-webkit-text-fill-color: orange;*/ font-family: 黑体; background:-webkit-linear-gradient(top,#eee,#aaa 50%,#333 51%,#000); -webkit-background-clip:text; -webkit-text-fill-color: transparent; }