我正在尝试在 CSS 中的颜色渐变上添加一个简单的 .png 模式。这是标记:
HTML:
<div class="pattern">
<div class="widget_heading">
<h4>Feed</h4>
</div>
</div>
CSS:
.pattern {
background: url(../img/leatherpattern.png) repeat;
}
.widget_heading {
display:block; border:1px solid #3F943A; height:40px; border-top-left-radius: 5px 5px;
border-bottom-right-radius: 5% 0%;
border-top-right-radius: 5px; background: #3c8522; /* Old browsers */
background: -moz-linear-gradient(top, #3c8522 0%, #599d40 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#3c8522), color-stop(100%,#599d40)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #3c8522 0%,#599d40 100%);
background: -o-linear-gradient(top, #3c8522 0%,#599d40 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #3c8522 0%,#599d40 100%); /* IE10+ */
background: linear-gradient(to bottom, #3c8522 0%,#599d40 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#3c8522', endColorstr='#599d40',GradientType=0 ); /* IE6-9 */
}
我不知道为什么它没有出现在上面,但它正在出现。任何帮助将不胜感激,谢谢!