透明背景图案

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了透明背景图案相关的知识,希望对你有一定的参考价值。

adds a checkered background to images, so images with transparency are revealed.

based upon: http://lea.verou.me/css3patterns/#checkerboard
  1. img {
  2. background-color: #FEFEFE;
  3. background-image: -webkit-linear-gradient(45deg, #CBCBCB 25%, transparent 25%, transparent 75%, #CBCBCB 75%, #CBCBCB), -webkit-linear-gradient(45deg, #CBCBCB 25%, transparent 25%, transparent 75%, #CBCBCB 75%, #CBCBCB);
  4. background-image: -moz-linear-gradient(45deg, #CBCBCB 25%, transparent 25%, transparent 75%, #CBCBCB 75%, #CBCBCB), -moz-linear-gradient(45deg, #CBCBCB 25%, transparent 25%, transparent 75%, #CBCBCB 75%, #CBCBCB);
  5. background-image: -o-linear-gradient(45deg, #CBCBCB 25%, transparent 25%, transparent 75%, #CBCBCB 75%, #CBCBCB), -o-linear-gradient(45deg, #CBCBCB 25%, transparent 25%, transparent 75%, #CBCBCB 75%, #CBCBCB);
  6. background-image: -ms-linear-gradient(45deg, #CBCBCB 25%, transparent 25%, transparent 75%, #CBCBCB 75%, #CBCBCB), -ms-linear-gradient(45deg, #CBCBCB 25%, transparent 25%, transparent 75%, #CBCBCB 75%, #CBCBCB);
  7. background-image: linear-gradient(45deg, #CBCBCB 25%, transparent 25%, transparent 75%, #CBCBCB 75%, #CBCBCB), linear-gradient(45deg, #CBCBCB 25%, transparent 25%, transparent 75%, #CBCBCB 75%, #CBCBCB);
  8. -webkit-background-size:30px 30px;
  9. -moz-background-size:30px 30px;
  10. background-size:30px 30px;
  11. background-position:0 0, 15px 15px;
  12. }

以上是关于透明背景图案的主要内容,如果未能解决你的问题,请参考以下文章

easyui实现背景图片半透明状态,悬浮在大背景之上

iOS CoreGraphics:用半透明图案抚摸会导致颜色损坏

ps怎么把白色背景改为透明

使用HTML编写一个网页:如何将图片依照想要的形状摆放,比如爱心。如何控制图片大小。请教如何写代码?

怎么制作透明图片,

在android活动中设置片段的形状和透明度