2016-07-05 68 views
0

爲什麼下面的動畫在Chrome中運行但在Firefox中不能運行?爲什麼動畫內容在Firefox中不起作用?

HTML:

<button>Loading</button> 

CSS:

button { 
    width: 70px; 
    text-align: left; 
} 

button:after { 
    content: ''; 
    animation: dots 1s infinite; 
} 

@keyframes dots { 
    0% { content: ''; } 
    25% { content: '.'; } 
    50% { content: '..'; } 
    75% { content: '...'; } 
} 

Playground

回答

3

因爲規範不允許content to be animated

+0

感謝您的鏈接。 [本文](https://css-tricks.com/animating-the-content-property/)對此有更多的闡述。 –

+2

是的,不幸的是,Chrome開發策略已經或多或少地做了他們想做的事情,而不是遵循標準。 Chrome是新的IE。 – rockerest

相關問題