已正式宣告棄用
This feature has been removed from the Web standards. Though some browsers may still support it, it is in the process of being dropped. Do not use it in old or new projects. Pages or Web apps using it may break at any time.

已過時
This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.

非標準元素 HTML Blink<blink>)可以讓該元素裡面的文字緩慢閃爍。

不要使用這個元素,因為它已經被棄用,而且是糟糕的設計。無障礙標準不會接受閃爍文字、而 CSS 規範上允許瀏覽器忽略閃爍效果。

DOM 介面

此元素並未被支援,因此是透過 HTMLUnknownElement 介面實做。

示例

<blink>Why would somebody use this?</blink>

結果(已經過淡化!)

Image:HTMLBlinkElement.gif

規範

此元素並非標準元素,也不屬於任何規範。不信的話,你自己來看 HTML 規範

CSS Polyfill

如果真的需要 polyfill,請使用以下的 CSS。它支援 IE10 以上。

blink {
    -webkit-animation: 2s linear infinite condemned_blink_effect; // for android
    animation: 2s linear infinite condemned_blink_effect;
}
@-webkit-keyframes condemned_blink_effect { // for android
    0% {
        visibility: hidden;
    }
    50% {
        visibility: hidden;
    }
    100% {
        visibility: visible;
    }
}
@keyframes condemned_blink_effect {
    0% {
        visibility: hidden;
    }
    50% {
        visibility: hidden;
    }
    100% {
        visibility: visible;
    }
}

瀏覽器相容性

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidiOS SafariSamsung Internet
Basic support
DeprecatedNon-standard
Chrome No support NoEdge No support NoFirefox No support 1 — 22IE No support NoOpera No support 2 — 15Safari No support NoWebView Android No support NoChrome Android No support NoEdge Mobile No support NoFirefox Android No support 4 — 22Opera Android No support 2 — 14Safari iOS No support NoSamsung Internet Android No support No

Legend

No support  
No support
Non-standard. Expect poor cross-browser support.
Non-standard. Expect poor cross-browser support.
Deprecated. Not for use in new websites.
Deprecated. Not for use in new websites.

參見

文件標籤與貢獻者

此頁面的貢獻者: teoli, iigmir
最近更新: teoli,