채택완료

크롬 focus 시 파란 테두리 없애는 방법좀 알려주세요

2018-09-17 (월) 16:26:53 16,778

크롬브라우저에서  input 박스에 클릭했을때 파란 테두리가 생기는데요

이걸 없애고 싶습니다.

인터넷 검색하니까

input:focus{

    outline: none;

}

이렇게 하면 된다는데 안되네요

방법 좀 알려주세요

|

답변 4개 / 댓글 3개

채택된 답변
+20 포인트

Copy
<html>
<head>
<style>
input,textarea:focus {

        outline: none;

   }
</style>

</head>

<body>

<input type="text" id="a" />

<textarea id="b"></textarea>

</body>

</html>

확인결과 잘됩니다.

답변에 대한 댓글 1개

2018-09-18 (화) 11:07:13
제 소스중에 뭔가 문제가 있나보네요
해당코드는 잘 되네요 감사합니다~

How to remove the border highlight on an input text element

https://stackoverflow.com/questions/1457849/how-to-remove-the-border-highlight-on-an-input-text-element

확인해보세요

답변에 대한 댓글 1개

2018-09-18 (화) 11:08:06
감사합니다~
2018-09-17 (월) 17:08:17

다른 css 값 때문에 우선순위에서 밀리는거 같습니다.

css 강제 적용 해보세요. (강제 적용도 안된다면, 개발자 도구로 어떤값이 적용되는지 확인해야합니다.)

input,textarea:focus {

        outline: none !important;

}

참고 : http://aboooks.tistory.com/120

답변에 대한 댓글 1개

2018-09-18 (화) 11:07:57
감사합니다~

<html>
<head>
<style>
input,textarea:focus {

        outline: none;

   }
</style>

</head>

<body>

<input type="text" id="a" />

<textarea id="b"></textarea>

</body>

</html>

확인결과 잘됩니다~

답변을 작성하려면 로그인이 필요합니다.