UNIVE.US: outline-color, focus일때 border 색상 변경

textarea나 input 태그를 focus 할때, border의 색상을 변경하기 위해서 :focus를 사용해서 border의 색상을 변경하게 어쩌구 저쩌구.. 이런식으로 코드를 작성했었다.
근데, 단 한 줄로 해당 기능을 구현할 수 있는 방법을 찾았다.

outline-color


outline-color 코드

border의 색상을 변경하고 싶은 박스에 일단 border 속성과 색상을 지정해준다. 그리고 outline-color 속성에 focus시 변경하고 싶은 색상을 넣어주면 끝이다.

참고
textarea focus 될 때, border 색상 변경

Comments