css怎么让文本渐变,使用纯CSS3实现的文本渐变色彩效果

CSS

语言:

CSSSCSS

确定

body {

background: #04161f;

font-family: "Lato", sans-serif;

margin: 3em auto;

max-width: 50em;

}

.gradient1 {

display: inline-block;

font-size: 96px;

margin: 0;

opacity: 0.9;

background: white;

color: black;

position: relative;

text-shadow: 1px 1px 0px #04161f, 1px -1px 0px #04161f, -1px -1px 0px #04161f, -1px 1px 0px #04161f;

}

.gradient1::before,

.gradient1::after {

position: absolute;

top: 0;

right: 0;

bottom: 0;

left: 0;

}

.gradient1::before {

background: -webkit-linear-gradient(left, #23966c, #faaa54, #e23b4a, #db0768, #360670);

background: linear-gradient(to right, #23966c, #faaa54, #e23b4a, #db0768, #360670);

content: '';

display: block;

mix-blend-mode: screen;

}

.gradient1::after {

content: "techbrood";

background: #04161f;

color: white;

mix-blend-mode: multiply;

}

.gradient2 {

text-align: left;

margin: 0 20px;

background: white;

color: black;

position: relative;

text-shadow: 1px 1px 0px #04161f, 1px -1px 0px #04161f, -1px -1px 0px #04161f, -1px 1px 0px #04161f;

}

.gradient2::before,

.gradient2::after {

position: absolute;

top: 0;

right: 0;

bottom: 0;

left: 0;

}

.gradient2::before {

background: -webkit-radial-gradient(circle, #23966c, #faaa54, #e23b4a, #db0768, #360670);

background: radial-gradient(circle, #23966c, #faaa54, #e23b4a, #db0768, #360670);

content: '';

display: block;

mix-blend-mode: screen;

}

.gradient2::after {

content: "Leading search engine for web animations and effects.";

background: #04161f;

color: white;

mix-blend-mode: multiply;

}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值