Reputation: 1
Highligted Portion of netflix that I want the code for
Original Image of Netlfix with the curved radial gradient
I am trying to replicate a plasma TV-like glowing border effect similar to the one seen on the Netflix website. I believe the effect can be achieved using CSS gradient and layering techniques. My current approach involves using radial gradients and multiple backgrounds, but I haven't been able to achieve the desired look. But I am not able to create it. What are the correct CSS techniques to:
I have uploaded two images of netflix, one the original image with the glowing plasma tv effect and the other with the annotated part that I am having problem replicating.
I am open to suggestions on:
::before
, ::after
)Any guidance or code snippets to achieve this effect would be appreciated!
I am sharing the HTML and CSS code for your reference:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Netflix Plasma Effect</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="main">
<nav>
<span><img src="assets/images/logo.svg" alt="Netflix Logo"></span>
<div>
<button>English</button>
<button>Sign In</button>
</div>
</nav>
<div class="box"></div>
<div class="hero">
<h1>Unlimited movies, TV shows and more</h1>
<p>Starts at ₹149. Cancel at any time.</p>
<p>Ready to watch? Enter your email to create or restart your membership.</p>
<div>
<input type="email" placeholder="Email Address">
<button>Get Started</button>
</div>
</div>
<div class="curved-container"></div>
</div>
</body>
</html>
@import url('https://fonts.googleapis.com/css2?family=Martel+Sans:wght@200;300;400;600;700;800;900&family=Poppins:wght@300;400;500;600;700;800;900&display=swap');
/* General Reset */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: "Poppins", sans-serif;
background-color: black;
color: white;
overflow: hidden;
}
/* Main Container */
.main {
position: relative;
height: 70vh;
background-image: url("https://assets.nflxext.com/ffe/siteui/vlv3/729ce5c2-d831-436a-8c9d-f38fea0b99b3/web/IN-en-20241209-TRIFECTA-perspective_4aef76eb-7d5b-4be0-93c0-5f67320fd878_large.jpg");
background-size: cover;
background-position: center;
}
.main .box {
height: 70vh;
width: 100%;
opacity: 0.69;
background-color: black;
position: absolute;
top: 0;
}
/* Add Overlay for Plasma Effect */
.main::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: radial-gradient(50% 100% at 50% -30%, rgba(64, 97, 231, 0.5) 30%, rgba(0, 0, 0, 0.7) 100%);
z-index: 0;
pointer-events: none;
mix-blend-mode: screen; /* Blends the plasma overlay for glowing effect */
}
/* Navigation Bar */
nav {
display: flex;
justify-content: space-between;
align-items: center;
padding: 20px 50px;
z-index: 10;
position: relative;
}
nav img {
width: 150px;
height: auto;
}
nav button {
background-color: red;
color: white;
border: none;
padding: 8px 16px;
font-size: 14px;
font-weight: 500;
cursor: pointer;
border-radius: 5px;
}
nav button:hover {
opacity: 0.8;
}
/* Curved Container */
.curved-container:before {
content: '';
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: -1;
margin-top: -.25rem;
border-radius: inherit;
background: linear-gradient(to right, rgba(33, 13, 22, 1) 16%, rgba(184, 40, 105, 1), rgba(229, 9, 20, 1), rgba(184, 40, 105, 1), rgba(33, 13, 22, 1) 84%);
}
/* Hero Section */
.hero {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
text-align: center;
gap: 20px;
height: calc(100vh - 80px);
position: relative;
z-index: 2;
}
.hero h1 {
font-size: 3rem;
font-weight: 800;
line-height: 1.2;
text-shadow: 2px 2px 10px rgba(255, 255, 255, 0.2);
}
.hero p {
font-size: 1.2rem;
font-weight: 400;
}
.input-container {
display: flex;
gap: 10px;
margin-top: 10px;
}
.input-container input {
padding: 10px;
width: 300px;
font-size: 1rem;
border-radius: 4px;
border: none;
}
.input-container button {
background-color: red;
color: white;
border: none;
padding: 10px 20px;
font-size: 1rem;
font-weight: 600;
border-radius: 4px;
cursor: pointer;
}
.input-container button:hover {
opacity: 0.9;
}
Now I am sharing the output that I am getting when I execute the code given above
enter image description hereOutput Error in Netlfix Clone
I applied it to a full-screen div
, but the gradient does not behave as expected, and I can't seem to achieve a glowing border that appears similar to the plasma TV effect.
I tried copying through inspect element but even then I couldn't perform it.
Upvotes: 0
Views: 45