사용자 운영 체제의 플랫폼 기본 스타일에 따라 요소의 스타일을 지정하기 위해 외모 속성을 사용합니다.
구문
CSS 모양 속성의 구문은 다음과 같습니다. -
Selector {
appearance: /*value*/;
-webkit-appearance: /*value*/; /*for Safari and Chrome */
-moz-appearance: /*value*/; /*for Firefox */
} 예
다음 예는 CSS 모양 속성을 보여줍니다.
<!DOCTYPE html>
<html>
<style>
input[type=checkbox] {
appearance: none;
-webkit-appearance: none;
-moz-appearance: none;
padding: 12px;
background-color: cyan;
box-shadow: inset 0 3px 3px 5px lightgreen;
border-radius:50%;
}
input[type=checkbox]:checked {
background-color: coral;
border: 6px solid cornflowerblue;
box-shadow: 0 1px 2px lightorange;
}
input[type=checkbox]:checked:after {
content:"Checked";
}
</style>
<body>
<input type="checkbox"> Custom Checkbox Example
</body>
</html> 이것은 다음과 같은 출력을 제공합니다.


예
<!DOCTYPE html>
<html>
<style>
input[type=checkbox] {
appearance: none;
-webkit-appearance: none;
-moz-appearance: none;
padding: 10px;
background-color: cyan;
border-radius:5%;
}
input[type=checkbox]:checked {
background-color: magenta;
}
input[type=checkbox]:checked:before {
content:"\2713";
color: white;
padding: initial;
font-weight: bold;
}
</style>
<body>
<input type="checkbox"> Another Custom Checkbox Example
</body>
</html> 이것은 다음과 같은 출력을 제공합니다.

