25
loading...
This website collects cookies to deliver better user experience
cover
CSS property as its background size to cover the entire container, even if it has to stretch the image or cut a little bit off one of the edges. The “Sign in” and “Get Started” buttons created are linked to our sign-in page with the help of an onclick()
element, which calls onto a function.function displayButton(){
var final = document.getElementById('final');
var main = document.getElementById('main');
final.classList.toggle('closed');
main.classList.add('closed');
}
input
elements, where the email uses a regex sequence of characters to validate an if/else
statement. The if/else
statement checks whether any value put into the email address input
element is in the form of an email, else an alert would pop up stating that the email is invalid. In a situation where it is left blank, a different alert pops up stating that the email cannot be left blank.if(eVal === ''){
alert('Email cannot be left blank');
} else if(!isEmail(eVal)){
alert('Email is invalid');
} else if(isEmail(eVal)){
console.log(true);
}
function isEmail(EmailVal){
return /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(EmailVal);
}
if(pVal === ''){
alert('Password cannot be left blank');
} else {
console.log(true);
}
if(isEmail(eVal) == true && pVal !== true){
thanks.innerHTML = 'Thanks for signing in. Click the sign out button'
}
autoplay playsinline muted loop
is added to the video element, where the playsinline
attribute enables the video to always play in a required position rather than in fullscreen. With the help of some CSS properties the videos and gifs are also sized and adjusted to fit their required positions.function toggle1(){
var x = document.getElementById('ans1');
var y = document.getElementById('rot1');
y.classList.toggle('rotate');
x.classList.toggle('closed');
}
classlist
property, where the closed
class has a CSS property of display: none
to hide or show its content.grid
CSS property to style it in the form of rows and columns, making it easier to design web pages without having to use floats and positioning. The CSS property grid-template-columns: repeat(4, 1fr)
creates 4 columns and a row. The extra CSS properties below are applied to make it look better..footer-column{
display: grid;
grid-template-columns: repeat(4, 1fr);
grid-gap: 4rem;
}