Home  >  Article  >  Web Front-end  >  How to modify the color of the textarea_html/css_WEB-ITnose

How to modify the color of the textarea_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 12:25:212560browse

How to simply modify the color of the subtitles inside a textarea?


Reply to the discussion (solution)

1: If it is all words, just define the color of the textarea style words directly.
2: If there are only individual keywords, you have to use JS. Only when similar keywords appear in the textarea will they be highlighted.

textarea{color:#f00;}
For some fonts, such as code highlighting, it can only be implemented with JS.

Can’t you add tags directly?

How to simply modify the color of the subtitles inside a textarea?

I just observed Google Translate
It is not possible to highlight a selected word in the textarea
It turns out that a div
is placed on the teatarea with the same text and then the highlighted word Use span to mark


How to simply modify the color of the textarea's internal subtitles?

I just observed Google Translate
It is not possible to highlight a selected word in the textarea
It turns out that a div
is placed on the teatarea with the same text and then the highlighted word Use span to mark
Logically speaking, divs should not be placed inside teatarea, as it should have no effect



How to simply modify the color of the textarea's internal fonts?

I just observed Google Translate
It is not possible to highlight a selected word in the textarea
It turns out that a div
is placed on the teatarea with the same text and then the highlighted word Use span to mark
Logically speaking, you shouldn’t be able to put divs in teatarea, it shouldn’t have any effect

I’m talking about textarea~~~

It’s like putting a facial mask on your face The same
is 2 layers




How to simply modify the color of the fonts inside the textarea?

I just observed Google Translate
It is not possible to highlight a selected word in the textarea
It turns out that a div
is placed on the teatarea with the same text and then the highlighted word Use span to mark
Logically speaking, you shouldn’t be able to put divs in teatarea, it shouldn’t have any effect

I’m talking about textarea~~~

It’s like putting a facial mask on your face Same
It’s 2 layers
Oh, soga, I understand, dear, I’m sorry, I misunderstood~

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn