CSS3特效(2)——文字特效

文件发光渐变

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        h1.start-gradient {
            font:100px "微软雅黑";
            font-weight:bold;
            text-shadow: 1px 2px 3px rgba(67,8,7,0.8);
            color:#c60df0;
            -webkit-mask-image:-webkit-gradient(linear, 0 0, 0 100%, from(rgba(0, 0, 0, 0.9)), color-stop(40%, rgba(0, 0, 0, 0.5)),to(rgba(0, 0, 0, 0)));
        }

    </style>
</head>
<body>
<h1 class="start-gradient">快速开始</h1>
</body>
</html>

文字描边外发光

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        body{
            background-color: #ccc;
        }
        p{
            text-align: center;
            padding: 24px;
            margin: 0;
            font-family: helvetica,arial,sans-serif;
            color: #d1d1d1;
            font-size: 80px;
            font-weight: bold;
        }
        .p1{
            text-shadow:-1px 0 black,
            0 1px black,
            1px 0 black,
            0 -1px black;
        }
        .p2{
            text-shadow:0 0 0.2em #f87,
            -1px -2px 0.2em #f87;
        }
    </style>
</head>
<body>
<p class="p1">Text Shadow</p>
<p class="p2">Text Shadow</p>
</body>
</html>

文字渐变

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        h1.start-gradient {
            font-weight: bold;
            font-family: helvetica;
            text-align:center;
            background: -webkit-linear-gradient(left, #4f185d , #fe5d4b);     /* 背景色渐变 */
            -webkit-background-clip: text;         /* 规定背景的划分区域 */
            -webkit-text-fill-color: transparent;  /* 防止字体颜色覆盖 */

        }
    </style>
</head>
<body>
<h1 class="start-gradient">快速开始</h1>
</body>
</html>

转载于:https://www.cnblogs.com/janas-luo/p/9605562.html

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值