From ad038d62217ff07b2f6896dc9405d72a20d4047a Mon Sep 17 00:00:00 2001 From: Patrick Tschuchnig Date: Sat, 25 Jan 2020 15:48:36 +0100 Subject: [PATCH] effect only in the center --- assets/css/crt-screen.css | 7 ++++--- assets/css/crt.css | 20 ++++++++++++-------- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/assets/css/crt-screen.css b/assets/css/crt-screen.css index d284da7..67f7a62 100644 --- a/assets/css/crt-screen.css +++ b/assets/css/crt-screen.css @@ -24,15 +24,16 @@ layout: none /* padding-right: 50px; */ height: 480px; width: 640px; - overflow: scroll; + overflow-y: auto; + overflow-x: auto; } .screen-content::before{ - z-index: 2; +/* z-index: 2; pointer-events: none; background-image: url({{site.baseurl}}/assets/images/scanline.png); background-repeat: repeat; width:200px; - height:200px; + height:200px;*/ } \ No newline at end of file diff --git a/assets/css/crt.css b/assets/css/crt.css index a13254f..6578c6c 100644 --- a/assets/css/crt.css +++ b/assets/css/crt.css @@ -143,26 +143,30 @@ http://aleclownes.com/2017/02/01/crt-display.html content: " "; display: block; position: absolute; - top: 0; - left: 0; - bottom: 0; - right: 0; + top: auto; + left: auto; + bottom: auto; + right: auto; background: rgba(18, 16, 16, 0.1); opacity: 0; z-index: 2; pointer-events: none; animation: flicker 3s infinite; + width: 640px; + height: 480px; } .crt::before { content: " "; display: block; position: absolute; - top: 0; - left: 0; - bottom: 0; - right: 0; + top: auto; + left: auto; + bottom: auto; + right: auto; background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06)); background-size: 100% 2px, 3px 100%; + width: 640px; + height: 480px; } .crt { animation: textShadow 5s infinite;