浏览代码

prevent flicker on hover

Hakim El Hattab 8 年之前
父节点
当前提交
f8b5813e59
共有 2 个文件被更改,包括 7 次插入5 次删除
  1. 4 3
      css/reveal.css
  2. 3 2
      css/reveal.scss

+ 4 - 3
css/reveal.css

@@ -232,7 +232,8 @@ body {
     -webkit-transition: all 0.15s ease, background-color 0.8s ease;
             transition: all 0.15s ease, background-color 0.8s ease;
     -webkit-transform-origin: 3px 50%;
-            transform-origin: 3px 50%; }
+            transform-origin: 3px 50%;
+    will-change: transform; }
   .reveal .controls button:before {
     -webkit-transform: translateX(10.5px) translateY(23px) rotate(44deg);
             transform: translateX(10.5px) translateY(23px) rotate(44deg); }
@@ -371,9 +372,9 @@ body {
   content: '';
   display: block;
   position: absolute;
-  height: 20px;
+  height: 10px;
   width: 100%;
-  top: -20px; }
+  top: -10px; }
 
 .reveal .progress span {
   display: block;

+ 3 - 2
css/reveal.scss

@@ -299,6 +299,7 @@ body {
 
 		transition: all 0.15s ease, background-color 0.8s ease;
 		transform-origin: $thickness/2 50%;
+		will-change: transform;
 	}
 
 	button {
@@ -453,9 +454,9 @@ body {
 		content: '';
 		display: block;
 		position: absolute;
-		height: 20px;
+		height: 10px;
 		width: 100%;
-		top: -20px;
+		top: -10px;
 	}
 	.reveal .progress span {
 		display: block;