본문 바로가기
CSS

[CSS] backdrop-filter 속성을 사용해서 특정 요소에 블러처리해주기

by 메이플 🍁 2022. 8. 8.

<div>
  The brown fox jumps over the lazy dog.
</div>
div {
  background-color: orange;
  font-size: 30px;
  padding: 20px;
  width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  position: relative;
}
div::after {
  border: 3px solid tomato;
  box-sizing: border-box;
  content: "";
  width: 50%;
  height: 100%;
  position: absolute;
  top: 0;
  right: 0;
  backdrop-filter: blur(10px);
}

댓글