<small id='esuGl'></small><noframes id='esuGl'>

    • <bdo id='esuGl'></bdo><ul id='esuGl'></ul>

  • <tfoot id='esuGl'></tfoot>

      <i id='esuGl'><tr id='esuGl'><dt id='esuGl'><q id='esuGl'><span id='esuGl'><b id='esuGl'><form id='esuGl'><ins id='esuGl'></ins><ul id='esuGl'></ul><sub id='esuGl'></sub></form><legend id='esuGl'></legend><bdo id='esuGl'><pre id='esuGl'><center id='esuGl'></center></pre></bdo></b><th id='esuGl'></th></span></q></dt></tr></i><div id='esuGl'><tfoot id='esuGl'></tfoot><dl id='esuGl'><fieldset id='esuGl'></fieldset></dl></div>
      <legend id='esuGl'><style id='esuGl'><dir id='esuGl'><q id='esuGl'></q></dir></style></legend>

        如何在 HTML 中双删除线?

        时间:2023-07-31
        <tfoot id='nYojJ'></tfoot>
      1. <i id='nYojJ'><tr id='nYojJ'><dt id='nYojJ'><q id='nYojJ'><span id='nYojJ'><b id='nYojJ'><form id='nYojJ'><ins id='nYojJ'></ins><ul id='nYojJ'></ul><sub id='nYojJ'></sub></form><legend id='nYojJ'></legend><bdo id='nYojJ'><pre id='nYojJ'><center id='nYojJ'></center></pre></bdo></b><th id='nYojJ'></th></span></q></dt></tr></i><div id='nYojJ'><tfoot id='nYojJ'></tfoot><dl id='nYojJ'><fieldset id='nYojJ'></fieldset></dl></div>
            <bdo id='nYojJ'></bdo><ul id='nYojJ'></ul>

            1. <legend id='nYojJ'><style id='nYojJ'><dir id='nYojJ'><q id='nYojJ'></q></dir></style></legend>

                  <tbody id='nYojJ'></tbody>

                • <small id='nYojJ'></small><noframes id='nYojJ'>

                • 本文介绍了如何在 HTML 中双删除线?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我知道 <s><del><strike> 标签.这些标签删除一个文本一次,但是我想不连续地删除一个文本 2 次.谁能告诉我该怎么做?提前致谢.

                  I know about <s>, <del> and <strike> tags. These tags strike out a text once, however I want to strike out a text 2 times discontinuously. Can anyone please tell me how to do it? Thanks in advance.

                  推荐答案

                  我能想到的唯一(干净的)方法(不涉及添加其他元素)是使用 :after CSS 伪元素:

                  The only (clean-ish) way I could think of (that doesn't involve additional elements being added) is to use the :after CSS pseudo-element:

                  del {
                      text-decoration: none;
                      position: relative;
                  }
                  del:after {
                      content: ' ';
                      font-size: inherit;
                      display: block;
                      position: absolute;
                      right: 0;
                      left: 0;
                      top: 40%;
                      bottom: 40%;
                      border-top: 1px solid #000;
                      border-bottom: 1px solid #000;
                  }
                  

                  JS Fiddle 演示.

                  这很可能在 Internet Explorer 中根本不起作用 <9(但我没有 any IE 可以用来测试),但应该可以在最新的浏览器中使用.已签入:Ubuntu 11.04 上的 Firefox 4.x、Chromium 12 和 Opera 11.

                  This is likely to to not work at all in Internet Explorer < 9 (but I don't have any IE with which I could test), but should be functional in up-to-date browsers. Checked in: Firefox 4.x, Chromium 12 and Opera 11 on Ubuntu 11.04.

                  更可靠的跨浏览器方法是在 del 中使用嵌套元素(在本例中为 span):

                  A more reliable cross-browser method is to use a nested element (in this instance a span) within the del:

                  <del>This text has a (contrived) double strike-through</del>
                  

                  加上CSS:

                  del {
                      text-decoration: none;
                      position: relative;
                  }
                  span {
                      position: absolute;
                      left: 0;
                      right: 0;
                      top: 45%;
                      bottom: 35%;
                      border-top: 1px solid #666;
                      border-bottom: 1px solid #666;
                  }
                  

                  JS Fiddle 演示.

                  这篇关于如何在 HTML 中双删除线?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:如何在 jquery 中用另一个标签替换 HTML 标签? 下一篇:下划线&lt;a&gt;悬停时标记

                  相关文章

                    <i id='ITkYM'><tr id='ITkYM'><dt id='ITkYM'><q id='ITkYM'><span id='ITkYM'><b id='ITkYM'><form id='ITkYM'><ins id='ITkYM'></ins><ul id='ITkYM'></ul><sub id='ITkYM'></sub></form><legend id='ITkYM'></legend><bdo id='ITkYM'><pre id='ITkYM'><center id='ITkYM'></center></pre></bdo></b><th id='ITkYM'></th></span></q></dt></tr></i><div id='ITkYM'><tfoot id='ITkYM'></tfoot><dl id='ITkYM'><fieldset id='ITkYM'></fieldset></dl></div>
                    • <bdo id='ITkYM'></bdo><ul id='ITkYM'></ul>

                      <small id='ITkYM'></small><noframes id='ITkYM'>

                      <tfoot id='ITkYM'></tfoot>

                      <legend id='ITkYM'><style id='ITkYM'><dir id='ITkYM'><q id='ITkYM'></q></dir></style></legend>