# 왜 CSS ::before 는 input과 img에는 동작하지 않을까

> Clean Markdown view of GeekNews topic #2781. Use the original source for factual precision when an external source URL is present.

## Metadata

- GeekNews HTML: [https://news.hada.io/topic?id=2781](https://news.hada.io/topic?id=2781)
- GeekNews Markdown: [https://news.hada.io/topic/2781.md](https://news.hada.io/topic/2781.md)
- Type: news
- Author: [xguru](https://news.hada.io/@xguru)
- Published: 2020-09-04T12:24:26+09:00
- Updated: 2020-09-04T12:24:26+09:00
- Original source: [webplatform.news](https://webplatform.news/issues/2020-08-26)
- Points: 5
- Comments: 0

## Topic Body

- ::before 와 ::after 는 replaced elements에는 동작 하지 않음

ㅤ→ audio, canvas, embed, iframe, img, input, object, video

- 이 개체들은 HTML스펙상 브라우저에 의해 ::before, ::after를 다 포함해서 대체되기 때문에 동작하지 않는 것

ㅤ→ img 는 상황에 따라 동작하기도 함 (FF/크롬에서 이미지 로딩 실패시 )

ㅤ→ input 은 종류에 따라 동작하기도 함 (크롬/사파리 는 체크박스와 라디오에는 동작 )

## Comments



_No public comments on this page._
