开发者

How can I set opacity of the reflection when using -webkit-box-reflect?

开发者 https://www.devze.com 2022-12-23 03:06 出处:网络
I\'ve been playing with the -webkit-box-reflect property in Chrome and can achieve a reflection that fades with the following code (it\'s example code from the Webkit blog):

I've been playing with the -webkit-box-reflect property in Chrome and can achieve a reflection that fades with the following code (it's example code from the Webkit blog):

-webkit-box-reflect:
  below 5px 
  -webkit-gradient(
  linear, left top, left bottom, 
  from(transparent), color-stop(0.5, transparent), to(white)
  );

Problem is, I want to set the opacity for the mask to a more subtle setting, but 开发者_如何学编程it seems to be choking on rgba(). Has anybody been able to successfully get different levels of opacity?

Any help is appreciated, thanks!


-webkit-box-reflect:
  below 5px 
-webkit-gradient(linear, left top, left bottom, from(transparent), 
  color-stop(0.5, transparent), 
  to(rgba(255, 255, 255, 0.5)));

Is this the code you were looking for? :)

0

精彩评论

暂无评论...
验证码 换一张
取 消