鿍奍;: ãã®æ©è½ã¯éæ¨å¥¨ã«ãªãã¾ãããã¾ã 対å¿ãã¦ãããã©ã¦ã¶ã¼ãããããããã¾ãããããã§ã«é¢é£ããã¦ã§ãæ¨æºããåé¤ããã¦ããããåé¤ã®æç¶ãä¸ã§ããããäºææ§ã®ããã ãã«æ®ããã¦ããå¯è½æ§ãããã¾ãã使ç¨ãé¿ããã§ããã°æ¢åã®ã³ã¼ãã¯æ´æ°ãã¦ãã ããããã®ãã¼ã¸ã®ä¸é¨ã«ããäºææ§ä¸è¦§è¡¨ãè¦ã¦å¤æãã¦ãã ããããã®æ©è½ã¯çªç¶åä½ããªããªãå¯è½æ§ããããã¨ã«æ³¨æãã¦ãã ããã
fontcolor()
ã¡ã½ããã¯ãæååã <font>
è¦ç´ ã«åã込㿠(<font color="...">str</font>
)ãæååãæå®ããããã©ã³ãè²ã§è¡¨ç¤ºãããããã«ããæååãçæãã¾ãã
ã¡ã¢: HTML ã©ããã¼ã¡ã½ããã¯ãã¹ã¦éæ¨å¥¨ã¨ãªã£ã¦ãããäºææ§ç®çã®ã¿ã§æ¨æºåããã¦ãã¾ããfontcolor()
ã®å ´åã<font>
è¦ç´ 㯠HTML5 ã§å»æ¢ããã¦ãããä»å¾ä½¿ç¨ããã¹ãã§ã¯ããã¾ããã代ããã«ã¦ã§ãéçºè
㯠CSS ããããã£ã使ç¨ãã¦ãã ããã
color
16 鲿°ã® RGB å¤ã¾ãã¯æååãªãã©ã«ã§è²ã表ãæååã§ãã CSS è²ãªãã¡ã¬ã³ã¹ã«ãè²åã®æååãªãã©ã«ã®ä¸è¦§ãããã¾ãã
éå§ã¿ã° <font color="color">
ï¼color
ã®ä¸ã®äºéå¼ç¨ç¬¦ã¯ "
ã«ç½®ãæãããã¾ãï¼ãstr
ã®ããã¹ããæ¥ã¦ãçµäºã¿ã° </font>
ãæ¥ãæååã§ãã
fontcolor()
ã¡ã½ããèªä½ã¯ãåç´ã«æååã®é¨åãæ¤è¨¼ãæ£è¦åããã«æ¥ç¶ããã ãã§ãããããã妥å½ãª <font>
è¦ç´ ã使ããã«ã¯ã16 鲿°ã® RGB ã§è¡¨ç¾ããå ´åã¯ã rrggbb
ã®æ¸å¼ã使ç¨ããå¿
è¦ãããã¾ããä¾ãã°ããµã¼ã¢ã³è²ã¯ red=FA, green=80, blue=72 ã§ããããããµã¼ã¢ã³è²ã® RGB å¤ã¯ "FA8072
" ã§ãã
以ä¸ã®ä¾ã¯ fontcolor()
ã¡ã½ããã使ç¨ãã¦ã HTML ã® <font>
è¦ç´ ãä¼´ãæååãçæãããã¨ã§æååã®è²ã夿´ãã¦ãã¾ãã
const worldString = "Hello, world";
console.log(`${worldString.fontcolor("red")} is red in this line`);
// '<font color="red">Hello, world</font> is red in this line'
console.log(
`${worldString.fontcolor("FF00")} is red in hexadecimal in this line`,
);
// '<font color="FF00">Hello, world</font> is red in hexadecimal in this line'
element.style
ãªãã¸ã§ã¯ãã使ç¨ããã¨ãè¦ç´ ã® style
屿§ã使ç¨ãã¦ã次ã®ããã«ãã£ã¨æ±ç¨çã«æä½ãããã¨ãã§ãã¾ãã
document.getElementById("yourElemId").style.color = "red";
仿§æ¸ ãã©ã¦ã¶ã¼ã®äºææ§ é¢é£æ
å ±
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4