zoukankan      html  css  js  c++  java
  • 禁用链接 <a>

    pointer-events

    Syntax

     1 /* Keyword values */
     2 pointer-events: auto;
     3 pointer-events: none;
     4 pointer-events: visiblePainted;
     5 pointer-events: visibleFill;
     6 pointer-events: visibleStroke;
     7 pointer-events: visible;
     8 pointer-events: painted;
     9 pointer-events: fill;
    10 pointer-events: stroke;
    11 pointer-events: all;
    12 
    13 /* Global values */
    14 pointer-events: inherit;
    15 pointer-events: initial;
    16 pointer-events: unset;

    Example

    1 <a href="link.html" class="not-active">Link</a>
    2 
    3 .not-active {
    4    pointer-events: none;
    5    cursor: default;
    6   opacity: 0.6;
    7 }

    jQuery Example

    1 // disable button
    2 $("#myLink").css({ 'pointer-events': 'none' });
    3 // enable it again
    4 $("#myLink").css({ 'pointer-events': '' });

    Bootstrap Disabled Link

    1  <a href="#" class="btn btn-primary btn-lg disabled" role="button">Primary link</a>
    2  <a href="#" class="btn btn-default btn-lg disabled" role="button">Link</a>

    相关:

    Disabled Buttons

    1 <style>
    2 .disabled {
    3     opacity: 0.6;
    4     cursor: not-allowed;
    5 }
    6 </style>
  • 相关阅读:
    predis操作
    mysql 笔记(转载)
    mysql 汉字根据首字母排序
    sql 优化
    update多条不同数据
    解决network is unreachable问题
    开启服务器端口
    数据库开启远程访问
    激活2021.2.1idea
    python向excel追加数据
  • 原文地址:https://www.cnblogs.com/hzj680539/p/5073648.html
Copyright © 2011-2022 走看看