CRT 스캔라인 효과 적용하기
[code]
<style>
.scanlines {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 1000;
pointer-events: none;
}
.scanlines::before, .scanlines::after {
display: block;
pointer-events: none;
content: "";
position: fixed;
}
.scanlines::before {
width: 100%;
height: 2px;
z-index: 1001;
background: rgba(0, 0, 0, 0.3);
opacity: 0.75;
animation: scanline 3s linear infinite;
}
.scanlines::after {
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 1000;
background: linear-gradient(to bottom, transparent 50%, rgba(0, 0, 0, 0.3) 51%);
background-size: 100% 4px;
animation: scanlines 1s steps(60) infinite;
}
/* ANIMATE UNIQUE SCANLINE */
@keyframes scanline {
0% {
transform: translateY(0);
}
100% {
transform: translateY(100%);
}
}
/* ANIMATE SCANLINES BACKGROUND */
@keyframes scanlines {
0% {
background-position: 0 0;
}
100% {
background-position: 0 100%;
}
}
</style>
[/code]
css 를 적용하고 싶은 곳에
<div class="scanlines"></div>
선언만 해주시면 됩니다.
아참 <link rel="stylesheet" href="커스텀 css주소">
적용하고 싶은 페이지에 css를 불러 오시거나,
테마의 style.css에 추가하시면 됩니다.
취미삼아 만든 곳에 적용했는데요.


스캔라인효과가 동적이라 캡쳐 화면에 담지를 못하겠습니다.
적용한 사이트는
https://nangman.net 입니다.
한해 마무리 잘하시고! 새해 복 많이 받으세요! 내년엔 좋은 일만 가득하시길!
댓글 3개
게시판 목록
자유게시판
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 공지 |
|
1주 전 | 10 | |
| 199628 | 2개월 전 | 220 | ||
| 199627 |
|
2개월 전 | 286 | |
| 199626 | 2개월 전 | 258 | ||
| 199625 | 2개월 전 | 156 | ||
| 199624 |
|
2개월 전 | 211 | |
| 199623 | 2개월 전 | 277 | ||
| 199622 | 2개월 전 | 221 | ||
| 199621 | 2개월 전 | 189 | ||
| 199620 | 2개월 전 | 149 | ||
| 199619 | 2개월 전 | 191 | ||
| 199618 | 2개월 전 | 125 | ||
| 199617 |
비버팩토리
|
2개월 전 | 243 | |
| 199616 | 2개월 전 | 139 | ||
| 199615 | 2개월 전 | 182 | ||
| 199614 | 2개월 전 | 227 | ||
| 199613 | 2개월 전 | 224 | ||
| 199612 | 2개월 전 | 183 | ||
| 199611 | 2개월 전 | 128 | ||
| 199610 | 2개월 전 | 92 | ||
| 199609 | 2개월 전 | 157 | ||
| 199608 |
techstar
|
2개월 전 | 141 | |
| 199607 | 2개월 전 | 217 | ||
| 199606 | 2개월 전 | 168 | ||
| 199605 | 2개월 전 | 238 | ||
| 199604 |
|
2개월 전 | 291 | |
| 199603 | 2개월 전 | 190 | ||
| 199602 | 2개월 전 | 178 | ||
| 199601 |
|
2개월 전 | 214 | |
| 199600 | 2개월 전 | 149 | ||
| 199599 | 2개월 전 | 218 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기