html5 meter样式,html - How to style HTML5 <meter> tag - Stack Overflow

I am wondering how I could style the new tag.

80/100

I just want to change the background color and the value color, but I can't find the right CSS properties.

For webkit-based browsers I've found these:

meter::-webkit-meter-horizontal-bar {

-webkit-appearance: meter;

background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#DDD), color-stop(0.2, #EEE), color-stop(0.45, #CCC), color-stop(0.55, #CCC), to(#DDD));

}

Pseudo element

meter::-webkit-meter-horizontal-optimum-value {

-webkit-appearance: meter;

background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#AD7), color-stop(0.2, #CEA), color-stop(0.45, #7A3), color-stop(0.55, #7A3), to(#AD7));

}

Pseudo element

meter::-webkit-meter-horizontal-suboptimal-value {

-webkit-appearance: meter;

background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#FE7), to(#FE7), color-stop(0.2, #FFC), color-stop(0.45, #DB3), color-stop(0.55, #DB3));

}

Pseudo element

meter::-webkit-meter-horizontal-even-less-good-value {

-webkit-appearance: meter;

background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#F77), to(#F77), color-stop(0.2, #FCC), color-stop(0.45, #D44), color-stop(0.55, #D44));

}

Pseudo element

meter::-webkit-meter-vertical-bar {

-webkit-appearance: meter;

background: -webkit-gradient(linear, 0% 0%, 100% 0%, from(#DDD), to(#DDD), color-stop(0.2, #EEE), color-stop(0.45, #CCC), color-stop(0.55, #CCC));

}

Pseudo element

meter::-webkit-meter-vertical-optimum-value {

-webkit-appearance: meter;

background: -webkit-gradient(linear, 0% 0%, 100% 0%, from(#AD7), to(#AD7), color-stop(0.2, #CEA), color-stop(0.45, #7A3), color-stop(0.55, #7A3));

}

Pseudo element

meter::-webkit-meter-vertical-suboptimal-value {

-webkit-appearance: meter;

background: -webkit-gradient(linear, 0% 0%, 100% 0%, from(#FE7), to(#FE7), color-stop(0.2, #FFC), color-stop(0.45, #DB3), color-stop(0.55, #DB3));

}

Pseudo element

meter::-webkit-meter-vertical-even-less-good-value {

-webkit-appearance: meter;

background: -webkit-gradient(linear, 0% 0%, 100% 0%, from(#F77), to(#F77), color-stop(0.2, #FCC), color-stop(0.45, #D44), color-stop(0.55, #D44));

}

Where can I find the right CSS properties for gecko-based browsers (Firefox), Opera and IE?

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值