Подтвердить что ты не робот

Изменение цветного текста в css

Мой html:

<html>  
<body>  
     <div id="example">this is example</div>  
</body>  
<html>

Мой css:

#example{text-decoration: line-through;color:#ccc;} 

Я выхожу из этого
out-put image
, но я хочу как это
i am trying to do like this, но я не может. Помогите мне сделать вот так.

4b9b3361

Ответ 2

Это пример, он работает правильно.

HTML:

<div id="example">
    this is example
    <span></span>
</div>

CSS

#example{
    color:#ccc;
    font-size: 20px;
    position: relative;
    display: inline-block;
}

#example span {
    position: absolute;
    width: 100%;
    border-top: 1px solid red;
    left: 0;
    top: 50%;
}

http://jsfiddle.net/amkrtchyan/RHPHX/1/