form:focus-within{
// to change form border color whenever form is in focus
}
header{
position:sticky;
z-index:999;
}
*grid-layout* for *header* when *screen-max-width* reaches 860px, before that **flex** was used
<link rel="icon" href="../Assests/Common/Images/pageHeaderAndFooter/favicon.ico">
404.html
<meta http-equiv="refresh" content="2;url=/AmazonClone/homepage/index.html">
let right = li.getBoundingClientRect().right;
window.innerWidth
main div#wrapperMainContent{
background-repeat: no-repeat;
background-size: contain;
animation-name: updateBackgroundImage;
animation-duration: var(--homepageCarouselSpeed);
animation-iteration-count: infinite;
animation-timing-function: step-end;
background-image: url(Images/heroSection/kitchenAndOutdoor.jpg);
}
@keyframes updateBackgroundImage {
0% {
background-image: url(Images/heroSection/kitchenAndOutdoor.jpg);
}
9%{
background-image: url(Images/heroSection/tShirtsAndPolos.jpg);
}
/*up to*/
90%{
background-image: url(Images/heroSection/fitness.jpg);
}
100% {
background-image: url(Images/heroSection/kitchenAndOutdoor.jpg);
}
}
animation-timing-function: step-end;
div.dealsOrOffers div.dealOrOffer h3{
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
box-shadow: inset 0 0 0 3px #007185;
clip-path: polygon(100% 0%, 91% 50%, 100% 100%, 0 99%, 0% 50%, 0 0);
<div id="google_translate_element"></div>
<!-- Google Translate -->
<script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
<script type="text/javascript">
function googleTranslateElementInit() {
new google.translate.TranslateElement({pageLanguage: 'en'}, 'google_translate_element');
}
</script>
container.scrollLeft += 200 //to scroll Right
container.scrollLeft += 200 // to scroll left
div.dealsOrOffers:active button.scrollLeft,
div.dealsOrOffers:active button.scrollRight{
opacity: .5;
}
:focus-within
property which get triggers whenver user is typing something on the input fieldposition:sticky & z-index
css rule i can make the page header section appear on top of webpage even when scrolling404.html
inside root then this webpage will be accessed if any webpage is not found on our webpagemeta http-equiv="refresh"
i can redirect user to homepagegetBoundingClientRect()
gives me the coordinates(x,y,bottom, right)
of element witin the viewport, this way i get position of element within viewport, and if it outside viewport i can easily check by window.innerWidth
and take measured accordingly, used this feature to handle clipping of header primary nav items.text-overflow: elipsis;
useful; it works only when two other properties overflow:hidden and white-space:nowrap
is set to.box-shadow: inset helpful
.scrollLeft
, if i add 200 to it, container inside content would move 200px right and vice versa
container.scrollLeft += 200
:hover
works good, but for touch devices like smartphones and tablets, the :active pseudo class
works good, :active
means whenever user presses the mouse button or tap on screen