2017-08-24 101 views
0

我已創建我在哪裏元件之前在這樣的關鍵幀擴大動畫寬度,展開從左側的CSS

.expertise_item:hover::before{ 
    opacity:1; 
    -webkit-animation:widthanimationexperties 3s cubic-bezier(0, 0, 0.72, 0.79); 
    -webkit-animation-iteration-count: 1; 
} 
@-webkit-keyframes widthanimationexperties { 
    0% { max-width:0;} 
    50% { max-width:150px; } 
    100% { max-width:300px;} 
} 

我有偶奇情況和我有翻轉甚至。

.expertise_item:nth-child(even)::before{ 
    bottom: -33px; 
    left: -134px; 
    -moz-transform: scaleX(-1); 
    -o-transform: scaleX(-1); 
    -webkit-transform: scaleX(-1); 
    transform: scaleX(-1); 
    filter: FlipH; 
    -ms-filter: "FlipH"; 
} 

問:我如何從左側展開div,而不是右側展開div甚至是elevemnt。

+1

哪裏是你的'HTML'越來越多的作用呢? –

+0

HTML無所謂只是一個div –

回答

0

你可以花費html元素在CSS把

margin-left: -134px; 
+0

我必須將div從0擴展到300px;但從右到左 –

+0

給它一個寬度和高度,如寬度:300px; height:300px;並給出一個背景:#000;這會讓你成爲300平方的分區。背景的目的將顯示您的黑色的div。 –