Преглед на файлове

Fix box sizing on examples

Using width:100% and padding without proper box-sizing causes elements to overflow on mobile, enabling overscroll-behavior in the X direction.
Xander Luciano преди 6 години
родител
ревизия
1837a4e036
променени са 4 файла, в които са добавени 9 реда и са изтрити 2 реда
  1. 1 0
      examples/misc_controls_deviceorientation.html
  2. 4 1
      examples/misc_controls_fly.html
  3. 1 1
      examples/misc_controls_map.html
  4. 3 0
      examples/misc_controls_transform.html

+ 1 - 0
examples/misc_controls_deviceorientation.html

@@ -20,6 +20,7 @@
 				font-size:13px;
 				font-weight: bold;
 				text-align:center;
+				box-sizing: border-box;
 			}
 
 			a {

+ 4 - 1
examples/misc_controls_fly.html

@@ -23,6 +23,7 @@
 				top: 0px; width: 100%;
 				padding: 5px;
 				z-index:100;
+				box-sizing: border-box;
 			}
 
 			a {
@@ -30,7 +31,9 @@
 				color: #0080ff;
 			}
 
-			b { color:orange }
+			b {
+				color:orange
+			}
 		</style>
 
 		<script src="../build/three.js"></script>

+ 1 - 1
examples/misc_controls_map.html

@@ -22,7 +22,7 @@
 				position: absolute;
 				top: 0px; width: 100%;
 				padding: 5px;
-
+				box-sizing: border-box;
 			}
 
 			a {

+ 3 - 0
examples/misc_controls_transform.html

@@ -15,12 +15,15 @@
 				line-height: 30px;
 				overflow: hidden;
 			}
+			
 			#info {
 				position: absolute;
 				top: 0px; width: 100%;
 				padding: 15px;
 				z-index:100;
+				box-sizing: border-box;
 			}
+			
 			a {
 				color: white;
 			}