어떻게 사용할 때만 비활성화하려면 https://partner. CSS?

Css 를 사용하여 https://partner. 비활성화해야 방법은 없나?

I have a 클래스 '와' 현재 페이지 불렀으매 스맥랜드의 링크를 클릭했을 때 테스트타사의 대체하십시오 비활성화해야 도왔으매 no action 클래스.

질문에 대한 의견 (4)
해결책

답은 이미 질문이예요 대한 설명 자세한 가시도로 복사, 나는 netwin 있습니다.

<! - begin 스니핏: js 숨기십시오: 거짓값 콘솔: 진정한 바벨. &gt 거짓값 -;

.not-active {
  pointer-events: none;
  cursor: default;
  text-decoration: none;
  color: black;
}
<a href="link.html" class="not-active">Link</a>

끝 - &lt 스니핏 >;!

Https://caniuse.com/ # 성과 = 포인터입니다 이벤트 브라우저 지원, 참조하시기 바랍니다. Ie 지원해야 하는 경우에는 해결 방법이 있습니다. 참조 이 질문에.

경고: '포인터입니다 이벤트' 의 css 의 사용을 비사양 svg 요소는 실험. 하지만, CSS3 의 일부라야 피쳐보다 행하였 구배면에 UI 로 인해 많은 미해결 문제, CSS4 사양은 연기된 것으로 전해졌습니다.

해설 (16)

<! - begin 스니핏: js 숨기십시오: 거짓값 콘솔: 거짓값 바벨. &gt 거짓값 -;

.disabled {
  pointer-events: none;
  cursor: default;
  opacity: 0.6;
}
<a href="#" class="disabled">link</a>

끝 - &lt 스니핏 >;!

해설 (4)

CSS 스타일 변경하십시오 뭔가 사용 가능합니다. 아마도 가장 잘 할 수 있는 링크를 숨김니다 순결케 CSS 는 아예 바꾸기도 한다.

정말 필요한 것은 너희는너희가 일부 자바스크립트. # 39 here& jQuery 라이브러리를 사용하여, d, s # 39 어떻게 you& 못하며창조된 그리웠댔지.

$('a.current-page').click(function() { return false; });
해설 (9)

39, css can& 할 수 없다. CSS 는 프레젠테이션입니다 뿐입니다. 옵션은 다음과 같습니다.

  • Don& href 속성에 ',' # 39, t ',' 당신의 포함시키십시오 &lt a&gt 것이다.
  • JavaScript 를 사용하는 찾을 수 있는 '클래스', '또는' 그들의 '앵커 요소를 제거하고 href 속성에 따라 온 클릭'. jQuery 보호하리요 함께라면 etlat (닉프 뭔가를 유사하지만 더 나은 방법을 보여주었다.
해설 (2)
<a href="#" class="btn btn-primary btn-lg disabled" role="button">Primary link</a>

<a href="#" class="btn btn-default btn-lg disabled" role="button">Link</a>
  • It looks like https://partner. * 부트스트랩에 비활성화됨 버튼를 하지만
Link
해설 (1)

Javascript: void (0) '' '' href 속성을 설정할 수 있습니다.

<! - begin 스니핏: js 숨기십시오: 거짓값 콘솔: 진정한 바벨. &gt 거짓값 -;

.disabled {
  /* Disabled link style */
  color: black;
}
<a class="disabled" href="javascript:void(0)">LINK</a>

끝 - &lt 스니핏 >;!

해설 (3)

그냥 HTML / CSS 양식의 싶으면 또 다른 옵션은 단추를 사용하여. 정보기술 (it) 과 '스타일' 속성을 비활성화했습니다 설정합니다.

E. g. http://jsfiddle.net/cFTxH/1/

해설 (0)

할 수 있는 유일한 방법은 CSS 를 설정할 수 없이 이 CSS 약간만이라도 랩할 div you& # 39 는 사라지고, 뭔가 다른 종류의 인간이 만든 시행하십시오 파일배치.

예:


<div class="disabled">
    <a class="toggleLink" href="wherever">blah</a>
    <span class="toggleLink">blah
해설 (0)

스케쳐내 CSS 전용 CSS 를 정의한 논리를 수 있도록 해야 한다.

39, ll, CSS 의 논리는 이동합니까 redefinitions you& 속성용 선택기를 사용할 수밖에 없다. 몇 가지 예를 들면 다음과 같습니다.

비활성화합니다 있는 링크를 정확한 href: '='

그래서 같은 특정 값을 포함하는 href 링크 비활성화하려면 선택할 수 있습니다.

<a href="//website.com/exact/path">Exact path</a>

[href="//website.com/exact/path"]{
  pointer-events: none;
}

비활성화해야 https://partner. 확장자입니다 하나의 경로: '=' *

여기에 포함된 모든 경로에서 비활성화됨을 키워드 링크 '/ /'

<a href="//website.com/keyword/in/path">Contains in path</a>

[href*="/keyword/"]{
  pointer-events: none;
}

비활성화해야 https://partner. 시작하는: = '^'

이 ' [속성 값을 ^ =]' 로 시작하는 작동자 대상 속성은 특정 값을. 웹 사이트 &amp 무시하려면 있습니다. 루트 경로.

<a href="//website.com/begins/with/path">Begins with path</a>

[href^="//website.com/begins/with"]{
  pointer-events: none;
}

Https 가 아닌 링크 비활성화하려면 이를 사용할 수도 있습니다. 예를 들면 다음과 같습니다.

a:not([href^="https://"]){
  pointer-events: none;
}

있는 링크를 비활성화합니다 motor1.1end 호스트당: '$ ='

[속성용 $ = value] '대상' 이 연산자입니다 sys_memsize 특정 값을 motor1.1end 속성입니다. 파일 확장자 무시하려면 유용할 수 있습니다.

<a href="/path/to/file.pdf">Link to pdf</a>

[href$=".pdf"]{
  pointer-events: none;
}

또는 기타 속성

Css 타격할 수 있는 HTML 속성. Rel ',' 수 '와' 대상 ',' 데이터 정의 드릴링됩니다.

<a href="#" target="_blank">Blank link</a>

[target=_blank]{
  pointer-events: none;
}

선택기를 속성용 결합

여러 규칙을 체인 수 있습니다. # 39 의 말하도다 let& 비활성화하려는 모든 외부 링크를 가리키는 것이 아니라 해당 웹 사이트에:

a[href*="//"]:not([href*="my-website.com"]) {
    pointer-events: none;
}

Pdf 파일 링크 또는 비활성화합니다 특정 웹 사이트.

<a href="//website.com/path/to/file.jpg">Link to image</a>

[href^="//website.com"][href$=".jpg"] {
  color: red;
}

브라우저 지원

이후 이 지원됩니까 속성뿐 선택기를 없습니다. () '이후 ie9 선택기를 ie7.'.

해설 (1)

이거 드세요.


.btn-disable {
    display:inline-block;
    pointer-events: none;       
}
해설 (0)

&gt. 등록 정보 포인터입니다 이벤트 제어할 수 있는 html 요소를 어떻게 할 수 있습니다. &gt. 마우스 / 터치 이벤트 - 호버/마우스 활성 상태에 대응하는 등, CSS &gt. javascript 에서 커서가 click/tap 있는지 여부, 그리고 이벤트 &gt. 가시적입니다.

That& # 39 의 것은 좋은 방법이 있지만, CSS 있는 유일한 방법은 비활성화합니다 https://partner. 작업하십시오 IE10+ 및 모든 새로운 브라우저:

<! - begin 스니핏: js 숨기십시오: 거짓값 콘솔: 진정한 바벨. &gt 거짓값 -;

.current-page {
  pointer-events: none;
  color: grey;
}
<a href="#" class="current-page">This link is disabled</a>

끝 - &lt 스니핏 >;!

해설 (1)

내가 인터넷을 통해 보다 나은 검색 및 찾을 수 없습니다. (이] 1. 기본적으로, CSS 와 같은 기능을 사용하는 스타일 때문에 버튼 클릭 > 비활성화하려면 추가하기만 포함한다.

$("#myLink").css({ 'pointer-events': 'none' });

그 후 이를 다시 활성화하십시오

$("#myLink").css({ 'pointer-events': '' });

Ie, Firefox 및 11 일 점검됩니다 통했다.

해설 (1)

내가 사용합니다.

.current-page a:hover {
pointer-events: none !important;
}

및 충분치 않다. 그래도 일부 브라우저에서는 링크를 표시되었는지 깜박이기.

내가 추가 했습니다.

.current-page a {
cursor: text !important;
}
해설 (1)

이 css 를 사용할 수 있습니다.

<! - begin 스니핏: js 숨기십시오: 거짓값 콘솔: 진정한 바벨. &gt 거짓값 -;

a.button,button {
    display: inline-block;
    padding: 6px 15px;
    margin: 5px;
    line-height: 1.42857143;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    -ms-touch-action: manipulation;
    touch-action: manipulation;
    cursor: pointer;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    background-image: none;
    border: 1px solid rgba(0, 0, 0, 0);
    border-radius: 4px;
    -moz-box-shadow: inset 0 3px 20px 0 #cdcdcd;
    -webkit-box-shadow: inset 0 3px 20px 0 #cdcdcd;
    box-shadow: inset 0 3px 20px 0 #cdcdcd;
}

a[disabled].button,button[disabled] {
    cursor: not-allowed;
    opacity: 0.4;
    pointer-events: none;
    -webkit-touch-callout: none;
}

a.button:active:not([disabled]),button:active:not([disabled]) {
    background-color: transparent !important;
    color: #2a2a2a !important;
    outline: 0;
    -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .5);
    box-shadow: inset 0 3px 5px rgba(0, 0, 0, .5);
}
disabled!
click me!
<a href="http://royansoft.com" disabled="disabled" class="button">test</a>
<a href="http://royansoft.com" class="button">test2</a>

끝 - &lt 스니핏 >;!

해설 (0)

내가 좀 더 다양한 솔루션을 제공하는 데 힘입어 지난해 모두라뇨 결합됨 외곽진입 고급 '비활성화됨' 기능. [이 사진을] (https://gist.github.com/rosskevin/fa3c6180102cfa75df63), 이 코드는 아래와 같습니다.

This provides for multiple levels of defense so that Anchors marked as disable actually behave as such.
Using this approach, you get an anchor that you cannot:
  - click
  - tab to and hit return
  - tabbing to it will move focus to the next focusable element
  - it is aware if the anchor is subsequently enabled

1.  Include this css, as it is the first line of defense.  This assumes the selector you use is 'a.disabled'
    a.disabled {
      pointer-events: none;
      cursor: default;
    }

 2. Next, instantiate this class such as (with optional selector):
    $ ->
      new AnchorDisabler()

다음은 코프스크리프트 클래스:

class AnchorDisabler
  constructor: (selector = 'a.disabled') ->
    $(selector).click(@onClick).keyup(@onKeyup).focus(@onFocus)

  isStillDisabled: (ev) =>
    ### since disabled can be a class or an attribute, and it can be dynamically removed, always recheck on a watched event ###
    target = $(ev.target)
    return true if target.hasClass('disabled')
    return true if target.attr('disabled') is 'disabled'
    return false

  onFocus: (ev) =>
    ### if an attempt is made to focus on a disabled element, just move it along to the next focusable one. ###
    return unless @isStillDisabled(ev)

    focusables = $(':focusable')
    return unless focusables

    current = focusables.index(ev.target)
    next = (if focusables.eq(current + 1).length then focusables.eq(current + 1) else focusables.eq(0))

    next.focus() if next

  onClick: (ev) =>
    # disabled could be dynamically removed
    return unless @isStillDisabled(ev)

    ev.preventDefault()
    return false

  onKeyup: (ev) =>

    # 13 is the js key code for Enter, we are only interested in disabling that so get out fast
    code = ev.keyCode or ev.which
    return unless code is 13

    # disabled could be dynamically removed
    return unless @isStillDisabled(ev)

    ev.preventDefault()
    return false
해설 (1)

또한 다른 요소가 크기 때문에 자동화합니다 링크 (오른쪽) 를 사용하여 z-인덱스): &Quot 될 eat"; 이 클릭.

(우리가 발견한 이 우연히 문제로 인해, 갑자기 비활성으로 때문에 하나님이 &quot 링크 responsive&quot. h2 는 때 이를 은폐하기 위해 설계 때문에 브라우저 창을 모바일 크기의.)

해설 (1)
  • [데모 여기서요] [1] *&lt br/>; 이 one&lt 시도하시겠습니까 br/>;
$('html').on('click', 'a.Link', function(event){
    event.preventDefault();
});
해설 (3)

<! - begin 스니핏: js 숨기십시오: 거짓값 콘솔: 진정한 바벨. &gt 거짓값 -;

<a href="#!">1) Link With Non-directed url</a><br><br>

<a href="#!" disabled >2) Link With with disable url</a><br><br>

끝 - &lt 스니핏 >;!

해설 (1)

보이지 않는 요소를 배치하십시오 그 위에 다른 하는 것이 요령. 이렇게 하면 비활성화합니다 떠 있는 효과 뿐 아니라,

.myButton{
    position: absolute;
    display: none;
}

.myButton::after{ 
    position: absolute;
    content:"";
    height:100%;
    width:100%;
    top:0;
    left:0;
}
해설 (0)

'은' 포인터입니다 이벤트 없음 비활성화합니다 링크:

.disabled {
       pointer-events:none;
}
<a href="#" class="disabled">link</a>
해설 (1)