html怎么做模糊条纹,CSS3 生成条纹渐变

CSS

语言:

CSSSCSS

确定

/*

Implode a list into a string, by jamming $d(ivisor) in between

each item.

*/

/*

generate a striped gradient.

@arg $colors a list of colors to display in the gradient

@arg $direction the direction for the resulting linear-gradient

@returns a linear-gradient usable in background[-image].

*/

@import url(http://fonts.googleapis.com/css?family=Roboto:400,700);

body {

background: -webkit-linear-gradient(left, #ff69b4 0%, #ff69b4 12.5%, #f00 12.5%, #f00 25%, #ffa500 25%, #ffa500 37.5%, #ff0 37.5%, #ff0 50%, #008000 50%, #008000 62.5%, #40e0d0 62.5%, #40e0d0 75%, #00f 75%, #00f 87.5%, #9400d3 87.5%, #9400d3 100%);

background: linear-gradient(to right, #ff69b4 0%, #ff69b4 12.5%, #f00 12.5%, #f00 25%, #ffa500 25%, #ffa500 37.5%, #ff0 37.5%, #ff0 50%, #008000 50%, #008000 62.5%, #40e0d0 62.5%, #40e0d0 75%, #00f 75%, #00f 87.5%, #9400d3 87.5%, #9400d3 100%);

font-family: Roboto;

font-weight: bold;

}

body span {

position: absolute;

font-size: 12.5vw;

width: 12.5vw;

text-align: center;

top: 50%;

-webkit-transform: translateY(-50%);

-ms-transform: translateY(-50%);

transform: translateY(-50%);

text-shadow: 0px 0px 10px rgba(0, 0, 0, 0.8);

}

body span:nth-of-type(1) {

color: #222;

left: 0vw;

}

body span:nth-of-type(2) {

color: #cecece;

left: 12.5vw;

}

body span:nth-of-type(3) {

color: #222;

left: 25vw;

}

body span:nth-of-type(4) {

color: #222;

left: 37.5vw;

}

body span:nth-of-type(5) {

color: #cecece;

left: 50vw;

}

body span:nth-of-type(6) {

color: #222;

left: 62.5vw;

}

body span:nth-of-type(7) {

color: #cecece;

left: 75vw;

}

body span:nth-of-type(8) {

color: #cecece;

left: 87.5vw;

}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值