我试图在我的网站上用IE7和IE8显示重复的渐变。我使用以下代码:
/* start code as CSS rules applied */
background-repeat: repeat-x;
background-color: white;
background: -webkit-repeating-linear-gradient(left, #CCD1D5, white, #CCD1D5, white, #CCD1D5, white, #CCD1D5, white 943px);
background: -moz-repeating-linear-gradient(left, #CCD1D5, white, #CCD1D5, white, #CCD1D5, white, #CCD1D5, white 943px);
background-image: -o-linear-gradient(180deg,#CCD1D5,white, #CCD1D5,white,#CCD1D5,white 943px);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#CCD1D5', endColorstr='white',GradientType=1);
/* end code as CSS rules applied */
它在Opera,Chrome,Firefox,IE9和IE10中工作,但我也需要它在IE7和IE8中工作。