任何人都可以告诉如何禁用css中的li中的点击和选择
我试过了
public static void main(String[] args) {
//declare variable for user input and call method to initialize it
int x = getNumber();
long fact;
int n;
//Output first line
System.out.println("N\t approximate e^" + x);
for (n = 5; n <= 100; n *= 2) {
if (n == 10) {
fact = myFact(x, n);
System.out.println(n + "\t " + fact);
n += 15;
} else {
fact = myFact(x, n);
System.out.println(n + "\t " + fact);
}
}
}
但是指针即将到来并且能够选择文本以避免
谢谢
答案 0 :(得分:1)
您需要将cursor
和user-select
属性指定为none
。
.disabled {
pointer-events:none;
opacity:0.6;
cursor:none;
-webkit-user-select: none; /* Chrome all / Safari all */
-moz-user-select: none; /* Firefox all */
-ms-user-select: none; /* IE 10+ */
user-select: none;
}
以下是对user-select
:https://css-tricks.com/almanac/properties/u/user-select/