1

選択した項目を「強調表示」する小さな JS スクリプトがありますが、もう強調表示したくないので、「目盛りのような」画像で選択したい

ありがとう

4

2 に答える 2

6

This can be done entirely to CSS.

Simply use the :before pseudo class like so (would also work with :after):

.highlight:before{
    content : url(https://www.uaf.edu/bblearn/prod/browser-checker/checkmark.gif);
}

.highlight2:before{
    content: url(http://awriteword.com/wp-content/uploads/2013/05/Red-Checkmark.png);
 }

http://jsfiddle.net/csXyB/


you could also use the unicode checkmark with the same technique.

.highlight:before{
    content : '✓';
    color : green;
}

.highlight2:before{
    content: '✓';
    color:red;
 }

http://jsfiddle.net/gY8Ud/

于 2013-10-16T15:42:17.890 に答える
0

You can make a checkmark character: ✓

To make it green you could assign a class to it:

// In your css
span.green {color:green;}

// In the HTML
<span class="green">&#x2713;</span>
于 2013-10-16T15:42:18.593 に答える