css中如何给文本设置添加一个删除线

css如何设置给文本添加一个删除线。可以使用text-decoration属性设置删除线,语法“text-decoration:line-through”。text-decoration属性设置元素文本修饰,值为line-through时,定义穿过文本下的一条线。

直接可以在文本设置中添加以下代码:

        .price{
            color:red;
            text-decoration: line-through;
        }

 

 

 

css中如何给文本设置添加一个删除线

相关文章:

你感兴趣的文章:

标签云: