/* 1. 文字阴影 */ p { text-shadow: 1px 1px 2px #ccc; } /* 2. 文字渐变 */ p { background: -webkit-linear-gradient(#0f0, #00f); -webkit-background-clip: text; -webkit-text-fill-color: transparent; } /* 3. 文字边框 */ p { -webkit-text-stroke: 1px #000; } /* 4. 文字旋转 */ p { transform: rotate(45deg); } /* 5. 文字放大 */ p { transform: scale(2); }
这些特效只是CSS3中文字特效的一小部分,更多的特效属性等待你去探索。