Explorar el Código

style(boost.vue): 禁用移动端元素的默认触摸高亮和选择行为

添加CSS属性防止移动端触摸高亮和文本选择,提升用户体验
reaper hace 1 mes
padre
commit
6282a9909f
Se han modificado 1 ficheros con 13 adiciones y 1 borrados
  1. 13 1
      app/pages/mobile/products/boost.vue

+ 13 - 1
app/pages/mobile/products/boost.vue

@@ -386,6 +386,18 @@ const toggleAccordion = (index) => {
     box-sizing: border-box;
   }
 
+  .toggle-container,
+  .toggle-option {
+    -webkit-tap-highlight-color: transparent;
+    -webkit-touch-callout: none;
+    -webkit-user-select: none;
+    -khtml-user-select: none;
+    -moz-user-select: none;
+    -ms-user-select: none;
+    user-select: none;
+    outline: none;
+  }
+
   .toggle-bg {
     position: absolute;
     top: 0;
@@ -521,7 +533,7 @@ const toggleAccordion = (index) => {
   }
 
   .simg {
-  
+
     margin: 0 -16px;
     width: 375px;
     height: auto;