html - 如何在 css3 渐变效果下添加不透明度低的背景图像

标签 html css

我的 photoshop 设计有渐变颜色,有 64 不透明度,它有图案我已经成功地做渐变和降低不透明度就像我在主题中的代码示例但我的问题是我如何可以添加图案

display: block;
position: relative;
width:100%;
height:100%;
background: rgba(137,206,157,1);
background: -moz-linear-gradient(top, rgba(137,206,157,1) 0%, rgba(74,187,154,0.64) 100%);
background: -webkit-gradient(left top, left bottom, color-stop(0%, rgba(137,206,157,1)), color-stop(100%, rgba(74,187,154,0.64)));
background: -webkit-linear-gradient(top, rgba(137,206,157,1) 0%, rgba(74,187,154,0.64) 100%);
background: -o-linear-gradient(top, rgba(137,206,157,1) 0%, rgba(74,187,154,0.64) 100%);
background: -ms-linear-gradient(top, rgba(137,206,157,1) 0%, rgba(74,187,154,0.64) 100%);
background: linear-gradient(to bottom, rgba(137,206,157,1) 0%, rgba(74,187,154,0.64) 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#89ce9d', endColorstr='#4abb9a', GradientType=0 );

最佳答案

1) #your box {
background-image: url('XX.gif');
/* here your code /*
}

2) 
<div id="box">
<div id="your_box">
</div>
</div>


#box {
background-image: url('XX.gif'); /* or put here a css3 grandient effect instead
background-color: #XY;
display: block;
position: relative;
width:100%;
height:100%;
overflow:hidden;
}

#box #your_box {
here your code
}

关于html - 如何在 css3 渐变效果下添加不透明度低的背景图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25775672/

相关文章:

javascript - iDangerous Swiper slider ,自定义覆盖不随 restslider 缩小

css - 在 SharePoint Designer 中添加新的 Css 样式

html - 带插入符号的 CSS 下拉菜单

javascript - Angular 范围。$watchCollection 不多次检查集合

jquery - 如果它与当前 url 匹配,则将类添加到当前链接?

jquery - 由 jQuery 创建的 CSS 样式化 JPlayer 元素

javascript - 单击文档正文中的任意位置时关闭菜单,菜单本身除外

javascript - 按 T​​ab 键进入某个输入字段时显示 div

html - 背景颜色不可见

jquery - .html() 和 .load() 之间的区别