Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Input의 value가 invalid한 값일 때 style 적용 #24

Open
eotkd4791 opened this issue Jul 10, 2021 · 0 comments
Open

Input의 value가 invalid한 값일 때 style 적용 #24

eotkd4791 opened this issue Jul 10, 2021 · 0 comments

Comments

@eotkd4791
Copy link
Owner

eotkd4791 commented Jul 10, 2021

input의 value가 invalid한 값일 경우에 invalid라는 가상 클래스(Pseudo class)가 해당 Input Element에 적용된다. 따라서 아래의 CSS 코드와 같이 적용하여 form validation에 대한 결과를 사용자에게 제공할 수 있다.

input:invalid {
  border: 3px solid red;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant