<ins>
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2015年7月.
简介
HTML <ins> 元素定义已经被插入文档中的文本。
尝试一下
<p>“You're late!”</p> <del> <p>“I apologize for the delay.”</p> </del> <ins cite="../howtobeawizard.html" datetime="2018-05"> <p>“A wizard is never late …”</p> </ins> del, ins { display: block; text-decoration: none; position: relative; } del { background-color: #fbb; } ins { background-color: #d4fcbc; } del::before, ins::before { position: absolute; left: 0.5rem; font-family: monospace; } del::before { content: "−"; } ins::before { content: "+"; } p { margin: 0 1.8rem 0; font-family: Georgia, serif; font-size: 1rem; } 属性
该元素支持所有 全局特性,除此以外还支持下列属性:
cite-
cite 属性的值指向一个文档的 URL,该文档解释了文本被插入或修改的原因。(目前该属性还没有被主流浏览器支持)
datetime-
该特性指示的此修改发生的时间和日期,并且该特性的值必须是一个有效的日期或者时间字符串。如果该值不能被解析为日期或者时间,则该元素不具有相关联的时间标记。
示例
html
<ins>这一段文本是新插入至文档的。</ins> 结果
这一段文本是新插入至文档的。
规范
| Specification |
|---|
| HTML> # the-ins-element> |