【发布时间】:2015-07-01 14:10:12
【问题描述】:
我正在开发一个 wordpress 标题,我想要一个渐变的底部边框,如下图所示。
这在 Crome 中运行良好,但在 IE 或 Firefox 中似乎不起作用。我不太擅长 css,我承认我从其他地方得到了这段代码。如何让渐变边框出现在 IE 和 Firefox 中?
CSS:
.entry-header {
/* The main titles links as displayed in the articles*/
color: #F1F1F1;
display: inline-block;
transition: all .3s ease;
font-family: 'Oswald', sans-serif;
padding-top: 5%;
background-color: #1F1F1F;
width: 100%;
/*The following code defines the linear gradient colors below each header - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
border-top:0px;
border-right:0px;
border-left:0px;
border-bottom: solid transparent;
border-bottom: 4px;
-moz-border-image: -moz-linear-gradient(left, #009C61 14.28571429%, #cc0099 28.57142857%, #cc9900 42.85714287%, #cc0033 57.14285716%, #0099cc 71.42857145%, #6600cc 85.71428574%, #66cc00 100%);
-webkit-border-image: -webkit-linear-gradient(left, #009C61 14.28571429%, #cc0099 28.57142857%, #cc9900 42.85714287%, #cc0033 57.14285716%, #0099cc 71.42857145%, #6600cc 85.71428574%, #66cc00 100%);
border-image: linear-gradient(to right, #3acfd5 0%, #009C61 14.28571429%, #cc0099 28.57142857%, #cc9900 42.85714287%, #cc0033 57.14285716%, #0099cc 71.42857145%, #6600cc 85.71428574%, #66cc00 100%);
border-image-slice: 1;
/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
}
【问题讨论】:
-
如果你不能让它在 IE 中工作不要惊讶,在 Internet Explorer 中让现代 CSS 工作并不容易。至于让它在 Firefox 和 Chrome 中运行,它看起来应该可以运行。我可以让它在 Chrome 中工作,但 Firefox 似乎不起作用。尝试在 FF 中研究linear gradients。我认为您的 CSS 可能不适合 Firefox。
标签: html wordpress css firefox