Hero Section Effect Issue

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP



Hero Section Effect Issue



I am a fresh web development student that has started studying this year and I've been interested in getting into more 'interesting' things with regards to CSS etc.



I came across this video: https://www.youtube.com/watch?v=o8DTzU0Iol8



And when following the code, my images wouldn't load at all. The Jscript animations work, the text/borders are there but the images won't load at all. I have tried multiple 'ways' of inserting the images and nothing wants to come through (with regards to what I have tried.)



I have also ran this through to a few qualified Web developer friends that are actively working in the field and even they couldn't find out the problem.




body
margin: 0;
padding: 0;
font-family: sans-serif;
/*background: #000;*/


.container
width: 100%;
height: 100vh;
overflow: hidden;


.container .column
width: 25%;
height: 100%;
float: left;
border-right: 2px solid rgba(0,0,0,.5);
box-sizing: border-box;
z-index: 1;


.container .column:last-child
border-right: none;


.container .column .content
position: relative;
height: 100%;


.container .column .content h1
position: absolute;
top: 50%;
transform: translateY(-50%);
width: 100%;
background: rgba(0,0,0,.1);
text-align: center;
margin: 0;
padding: 0;
color: rgba(255,255,255,.2);
font-size: 15em;
border-top: 2px solid rgba(0,0,0,.5);
border-bottom: 2px solid rgba(0,0,0,.5);


.container .column .content .box
position: absolute;
top: 50%;
transform: translateY(100%);
box-sizing: border-box;
padding: 40px;
background: rgba(255,255,255,1);
text-align: center;
transition: 0.5s;
opacity: 0;


.container .column.active .content .box
opacity: 1;
transform: translateY(-50%);


.container .column .content .box h2
margin: 0;
padding: 0;
font-size: 30px;
color: #262626;


.container .column .content .box p
color: #262626;
font-size: 18px;


.container .column bg
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
pointer-events: none;
z-index: -1;


.container .column.active .bg.bg1
background: url(bg1.jpg);
background-size: cover;
background-attachment: fixed;
background-position: center;
transition: 0.5s;


.container .column.active .bg.bg2
background: url(bg2.jpg);
background-size: cover;
background-attachment: fixed;
background-position: center;
transition: 0.5s;


.container .column.active .bg.bg3
background: url(bg3.jpg);
background-size: cover;
background-attachment: fixed;
background-position: center;
transition: 0.5s;


.container .column.active .bg.bg4
background: url(bg4.jpg);
background-size: cover;
background-attachment: fixed;
background-position: center;
transition: 0.5s;


<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<title>Vegete the Saiyan Prince</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<div class="container">
<div class="column active">
<div class="content">
<h1>1</h1>
<div class="box">
<h2>What is lorem ipsum</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
</div>
</div>
<div class="bg bg1"></div>
</div>
<div class="column">
<div class="content">
<h1>2</h1>
<div class="box">
<h2>What is lorem ipsum</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
</div>
</div>
<div class="bg bg2"></div>
</div>
<div class="column">
<div class="content">
<h1>3</h1>
<div class="box">
<h2>What is lorem ipsum</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
</div>
</div>
<div class="bg bg3"></div>
</div>
<div class="column">
<div class="content">
<h1>4</h1>
<div class="box">
<h2>What is lorem ipsum</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
</div>
</div>
<div class="bg bg4"></div>
</div>
</div>

<script src="https://code.jquery.com/jquery-3.3.1.js"></script>
<script type="text/javascript">
$(document).on('mouseover', '.container .column', function()
$(this).addClass('active').siblings().removeClass('active')
);

</script>

</body>
</html>


</script>





I would upload the images but they're all just some backgrounds for the code anyway. I am sorry for any bad formatting etc. (I am still somewhat fresh to it.)



Thank you in advance <3!









By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

make 2 or more post in bootsrap

Store custom data using WC_Cart add_to_cart() method in Woocommerce 3

Firebase Auth - with Email and Password - Check user already registered