本文介绍了无法在子列表中删除直通的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以下代码显示有两个嵌套列表。外部一个与text-decoration:line-through属性和其他没有通过。我如何删除这个内线通过或不应用它在第一?我想在外部而不是内部一词上进行换行。

The following code show have two nested lists. The outer one with text-decoration:line-through property and the other with no line through. How can I remove this inner line-through or not apply it in the first place?!! I want line-through on the word "outer" but not "inner"

    <DOCTYPE html>
<header><style>
ol li {text-decoration:line-through; color:red;}
ol li ul li{text-decoration:none; color:pink;}

</style></header>
<body>
    <ol>
        <li>Outter
            <ul>
                <li>
                    Inner
                </li>
            </ul>
        </li>
    </ol>
</body>


推荐答案

inline-block ,以避免父母的 text-decoration 影响其子女。

You can use display: inline-block to avoid parent's text-decoration affecting its children.

,根据,

这篇关于无法在子列表中删除直通的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-24 14:55
查看更多