Obsolete since
HTML5
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
<strike>
element
(或
HTML Strikethrough Element
) places a strikethrough (horizontal line) over text.
Usage note:
This element is deprecated in HTML 4 and XHTML 1, and obsoleted in HTML5. If semantically appropriate, i.e., if it represents
deleted
content, use
<del>
instead. In all other cases use
<s>
.
| DOM 接口 |
HTMLElement
|
|---|
此元素包括 全局属性 .
<strike>: <strike>Today's Special: Salmon</strike> SOLD OUT<br /> <s>: <s>Today's Special: Salmon</s> SOLD OUT
The result of this code is:
| 规范 | 状态 | 注释 |
|---|---|---|
|
HTML5
The definition of '<strike>' in that specification. |
推荐 |
Make obsolete in favor of
<del>
and
<s>
.
|
|
HTML 4.01 Specification
The definition of '<strike>' in that specification. |
推荐 |
Make deprecated in favor of
<del>
and
<s>
.
|
| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
strike
弃用
|
Chrome 完整支持 Yes | Edge 完整支持 12 |
Firefox
完整支持
Yes
注意事项
|
IE 完整支持 Yes | Opera 完整支持 Yes | Safari 完整支持 Yes | WebView Android 完整支持 Yes | Chrome Android 完整支持 Yes |
Firefox Android
完整支持
Yes
注意事项
|
Opera Android 完整支持 Yes | Safari iOS 完整支持 Yes | Samsung Internet Android 完整支持 Yes |
完整支持
弃用。不要用于新网站。
见实现注意事项。
<s>
元素。
<del>
element should be used if the data has been
deleted
.
text-decoration
property can be used to style text with a strikethrough.