html 状态灯,HTML – LED灯边框

我创造了LED灯边框-

http://codepen.io/anon/pen/grvYQp

它仅在屏幕设置为特定大小时才有效.我应该在代码中做出哪些更改,以便它适用于任何大小的屏幕?

HTML

CSS

@keyframes ledFlash {

0% {

background-size: 100% 100%;

}

50% {

background-size: 160% 160%;

}

100% {

background-size: 100% 100%;

}

}

body {

background: #000;

padding: 10px;

}

div {

float: left;

margin-left: 15px;

}

ul {

display: block;

float: left;

}

ul li {

margin: 2px;

display: block;

width: 30px;

height: 30px;

border-radius: 50%;

}

ul .bulb {

background-attachment: scroll;

background-clip: border-box;

background-color: transparent;

background: -moz-radial-gradient(center, ellipse cover, rgba(195, 255, 0, 1) 0%, rgba(41, 154, 11, 0) 100%);

/* FF3.6+ */

background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%, rgba(195, 255, 0, 1)), color-stop(100%, rgba(41, 154, 11, 0)));

/* Chrome,Safari4+ */

background: -webkit-radial-gradient(center, ellipse cover, rgba(195, 255, 0, 1) 0%, rgba(41, 154, 11, 0) 100%);

/* Chrome10+,Safari5.1+ */

background: -o-radial-gradient(center, ellipse cover, rgba(195, 255, 0, 1) 0%, rgba(41, 154, 11, 0) 100%);

/* Opera 12+ */

background: -ms-radial-gradient(center, ellipse cover, rgba(195, 255, 0, 1) 0%, rgba(41, 154, 11, 0) 100%);

/* IE10+ */

background: radial-gradient(ellipse at center, rgba(195, 255, 0, 1) 0%, rgba(41, 154, 11, 0) 100%);

/* W3C */

filter: progid: DXImageTransform.Microsoft.gradient( startColorstr='#c3ff00', endColorstr='#00299a0b', GradientType=1);

/* IE6-9 fallback on horizontal gradient */

background-position: center center;

background-repeat: repeat;

background-size: 100% 100%;

animation: ledFlash 1.5s infinite;

}

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值