ITPub博客

首页 > 应用开发 > Java > 绝对酷的CSS3文字阴影特效

绝对酷的CSS3文字阴影特效

Java 作者:chunzhisu 时间:2014-07-04 17:14:22 0 删除 编辑

点击(此处)折叠或打开

  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset=\"gb2312\">
  5. <title>CSS3文字阴影实现乳白文字效果</title>
  6. <style>
  7. .milky {
  8.   font-family: \"Arial Rounded MT Bold\", \"Helvetica Rounded\", Arial, sans-serif;;
  9.   text-transform: uppercase;
  10.   display: block;
  11.   font-size: 92px;
  12.   color: #f1ebe5;
  13.   text-shadow: 0 8px 9px #c4b59d, 0px -2px 1px #fff;
  14.   font-weight: bold;
  15.   letter-spacing: -4px;
  16.   text-align: center;
  17.   background: linear-gradient(to bottom, #ece4d9 0%,#e9dfd1 100%);
  18.   position: absolute;
  19.   padding: 100px 200px;
  20.   top: 50%;
  21.   left: 50%;
  22.   transform: translate(-50%,-50%);
  23.   border-radius: 20px;
  24. }
  25. body,html {
  26.   height: 100%;
  27. }
  28. article,
  29. aside,
  30. details,
  31. figcaption,
  32. figure,
  33. footer,
  34. header,
  35. hgroup,
  36. main,
  37. nav,
  38. section,
  39. summary {
  40.     display: block;
  41. }
  42. audio,
  43. canvas,
  44. video {
  45.     display: inline-block;
  46. }
  47. audio:not([controls]) {
  48.     display: none;
  49.     height: 0;
  50. }
  51. [hidden] {
  52.     display: none;
  53. }
  54. html {
  55.     font-family: sans-serif; /* 1 */
  56.     -ms-text-size-adjust: 100%; /* 2 */
  57.     -webkit-text-size-adjust: 100%; /* 2 */
  58. }
  59. body {
  60.     margin: 0;
  61. }
  62. a:focus {
  63.     outline: thin dotted;
  64. }
  65. a:active,
  66. a:hover {
  67.     outline: 0;
  68. }
  69. h1 {
  70.     font-size: 2em;
  71.     margin: 0.67em 0;
  72. }
  73. abbr[title] {
  74.     border-bottom: 1px dotted;
  75. }
  76. b,
  77. strong {
  78.     font-weight: bold;
  79. }
  80. dfn {
  81.     font-style: italic;
  82. }
  83. hr {
  84.     -moz-box-sizing: content-box;
  85.     box-sizing: content-box;
  86.     height: 0;
  87. }
  88. mark {
  89.     background: #ff0;
  90.     color: #000;
  91. }
  92. code,
  93. kbd,
  94. pre,
  95. samp {
  96.     font-family: monospace, serif;
  97.     font-size: 1em;
  98. }
  99. pre {
  100.     white-space: pre-wrap;
  101. }
  102. q {
  103.     quotes: \"\\201C\" \"\\201D\" \"\\2018\" \"\\2019\";
  104. }
  105. small {
  106.     font-size: 80%;
  107. }
  108. sub,
  109. sup {
  110.     font-size: 75%;
  111.     line-height: 0;
  112.     position: relative;
  113.     vertical-align: baseline;
  114. }
  115. sup {
  116.     top: -0.5em;
  117. }
  118. sub {
  119.     bottom: -0.25em;
  120. }
  121. img {
  122.     border: 0;
  123. }
  124. svg:not(:root) {
  125.     overflow: hidden;
  126. }
  127. figure {
  128.     margin: 0;
  129. }
  130. fieldset {
  131.     border: 1px solid #c0c0c0;
  132.     margin: 0 2px;
  133.     padding: 0.35em 0.625em 0.75em;
  134. }
  135. legend {
  136.     border: 0; /* 1 */
  137.     padding: 0; /* 2 */
  138. }
  139. button,
  140. input,
  141. select,
  142. textarea {
  143.     font-family: inherit; /* 1 */
  144.     font-size: 100%; /* 2 */
  145.     margin: 0; /* 3 */
  146. }
  147. button,
  148. input {
  149.     line-height: normal;
  150. }
  151. button,
  152. select {
  153.     text-transform: none;
  154. }
  155. button,
  156. html input[type=\"button\"], /* 1 */
  157. input[type=\"reset\"],
  158. input[type=\"submit\"] {
  159.     -webkit-appearance: button; /* 2 */
  160.     cursor: pointer; /* 3 */
  161. }
  162. button[disabled],
  163. html input[disabled] {
  164.     cursor: default;
  165. }
  166. input[type=\"checkbox\"],
  167. input[type=\"radio\"] {
  168.     box-sizing: border-box; /* 1 */
  169.     padding: 0; /* 2 */
  170. }
  171. input[type=\"search\"] {
  172.     -webkit-appearance: textfield; /* 1 */
  173.     -moz-box-sizing: content-box;
  174.     -webkit-box-sizing: content-box; /* 2 */
  175.     box-sizing: content-box;
  176. }
  177. input[type=\"search\"]::-webkit-search-cancel-button,
  178. input[type=\"search\"]::-webkit-search-decoration {
  179.     -webkit-appearance: none;
  180. }
  181. button::-moz-focus-inner,
  182. input::-moz-focus-inner {
  183.     border: 0;
  184.     padding: 0;
  185. }
  186. textarea {
  187.     overflow: auto; /* 1 */
  188.     vertical-align: top; /* 2 */
  189. }
  190. table {
  191.     border-collapse: collapse;
  192.     border-spacing: 0;
  193. }
  194. </style>
  195. <script src=\"/jscss/demoimg/201404/prefixfree.min.js\"></script>
  196. </head>
  197. <body>
  198. <div class=\"milky\">网页特效</div>
  199. <div style=\"text-align:center;margin:400px 0; font:normal 14px/24px \'MicroSoft YaHei\';\">
  200. </div>
  201. </body>
  202. </html>

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/29737856/viewspace-1209644/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: 没有了~
请登录后发表评论 登录
全部评论

注册时间:2014-07-04

  • 博文量
    95
  • 访问量
    122215