HTMLInputElement: alpha ããããã£
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Experimental: ããã¯å®é¨çãªæ©è½ã§ãã
æ¬çªã§ä½¿ç¨ããåã«ãã©ã¦ã¶ã¼äºææ§ä¸è¦§è¡¨ããã§ãã¯ãã¦ãã ããã
alpha 㯠HTMLInputElement ã¤ã³ã¿ã¼ãã§ã¤ã¹ã®ããããã£ã§ã<input> è¦ç´ ã® alpha 屿§ãåæ ããCSS è²ã®ã¢ã«ãã¡æåãã¦ã¼ã¶ã¼ãæä½å¯è½ã§ãããå®å
¨ã«ä¸éæã¨ã¯éããªãããããã§ãªããã示ãã¾ãããã㯠color ã³ã³ããã¼ã«ã®ã¿ã«é¢é£ãã¾ãã
å¤
è«çå¤ã§ãã
ä¾
html
<input id="color-picker" type="color" alpha />
js
const colorInput = document.getElementById("color-picker");
if (colorInput.alpha) {
// ã¢ã«ãã¡æåãæã¤è²å¤
} else {
// å®å
¨ã«ä¸éæãªè²å¤
}
仿§æ¸
| Specification |
|---|
| HTML > # dom-input-alpha > |