文章詳情頁
css3 - css @keyframe 能帶小數嗎
瀏覽:123日期:2023-07-29 18:11:15
問題描述
比如 10.3% 如果可以精確度是多少?
問題解答
回答1:可以,但是最多只能保持2為小數點。
@keyframes myAnimation { 0% { height: 100px; } 33.3% { height: 120px; } 66.6% { height: 140px; } 100% { height: 200px; }}
When it comes to CSS it takes notice of percentages down to 2 decimal places and then stops. So you would be able to get 33.34% but not 33.3457% for use in your keyframes
SO上的相關鏈接:
Is it allowed to use any decimal value in CSS keyframe animations?
Can you use more than a whole number with @keyframe percents?
標簽:
CSS
相關文章:
1. css - chrome下a標簽嵌套img 顯示會多個小箭頭?2. sql語句 - mysql中關聯表查詢問題3. python - django models 為生成的html元素添加樣式。4. javascript - 如何將一個div始終固定在某個位置;無論屏幕和分辨率怎么變化;div位置始終不變5. javascript - vscode alt+shift+f 格式化js代碼,通不過eslint的代碼風格檢查怎么辦。。。6. javascript - 有什么比較好的網頁版shell前端組件?7. javascript - 原生canvas中如何獲取到觸摸事件的canvas內坐標?8. javascript - iframe 為什么加載網頁的時候滾動條這樣顯示?9. html - vue項目中用到了elementUI問題10. mysql updtae追加數據sql語句
排行榜
