2012-08-10 118 views
1

http://jsbin.com/enazac/1/對角線爲背景的CSS - 如何切換的角度

如何改變方向,從而代替「\」的方向去行,他們可以在「/」的方向走?我在網上發現了這個CSS,我喜歡它,只需要切換方向。

警告:我修剪了很多CSS,所以它可以在Chrome中正常工作,我不確定其他瀏覽器是否會渲染它。謝謝。

的CSS:

.diagonal_lines_pattern { 
    background-image: -webkit-gradient(linear, left bottom, right top, color-stop(0, #E76801), color-stop(0.25, #E76801), color-stop(0.25, #EC7F24), color-stop(0.5, #EC7F24), color-stop(0.5, #E76801), color-stop(0.75, #E76801), color-stop(0.75, #EC7F24)); 
    background-size: 20px 20px; 
    width:100%; 
    height:100%; 
} 

回答

1

玩的CSS ....改變左派權利,上衣底部...

-webkit-gradient(linear, left top, right bottom,... 

更多信息上-webkit-gradient

2
.diagonal_lines_pattern{ 
    background-image: -webkit-gradient(linear, left top, right bottom, color-stop(0, #E76801), color-stop(0.25, #E76801), color-stop(0.25, #EC7F24), color-stop(0.5, #EC7F24), color-stop(0.5, #E76801), color-stop(0.75, #E76801), color-stop(0.75, #EC7F24)); 
    background-size: 20px 20px; 
    width:100%; 
    height:100%; 
} 
+0

這在Firefox中不顯示任何東西(CSS看起來不正確)。 – 2013-03-08 18:36:12