COMPLETE WEB DEVELOPMENT BOOTCAMP : TUTORIALS
COMPLETE WEB DEVELOPMENT BOOTCAMP TUTORIALS
CSS GRID TEMPLATE AREA : TUT44AREA.HTML
<!DOCTYPE html>
<html lang="en">
<head>
<!-- PRACTICE ADDING GRID IN SECTION, NAVBAR -->
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CSS grid template Area</title>
<style>
.container{
display: grid;
grid-gap: 1rem;
grid-template-areas:
'navbar navbar navbar navbar'
'section section section aside'
'footer footer footer footer';
}
.items{
border: 2px solid black;
background-color: aqua;
padding: 23px 34px;
}
#navbar{
grid-area: navbar;
}
#section{
grid-area: section;
}
#aside{
grid-area: aside;
}
#footer{
grid-area: footer;
}
</style>
</head>
<body>
<div class="container">
<div class="items" id="navbar">
Lorem ipsum dolor sit amet consectetur adipisicing elit. Quae ullam architecto atque nisi autem dicta, deserunt assumenda veniam officiis! Doloribus at iste numquam magni, saepe totam vitae tempore esse enim! Quae sit aut dolorum! Magnam tempora nulla, doloremque fuga recusandae voluptas officiis explicabo ex vero debitis dolores odio at eos, iure neque ipsa rem qui necessitatibus.
</div>
<div class="items" id="section">
Lorem ipsum dolor sit amet consectetur adipisicing elit. Quae ullam architecto atque nisi autem dicta, deserunt assumenda veniam officiis! Doloribus at iste numquam magni, saepe totam vitae tempore esse enim! Quae sit aut dolorum! Magnam tempora nulla, doloremque fuga recusandae voluptas officiis explicabo ex vero debitis dolores odio at eos, iure nequearum cum. Dolores, odio.z
</div>
<div class="items" id="aside">
necessitatibus. Doloremque, officiis assumenda nostrum tenetur, consequatur quos ipsam veniam consectetur cumque exercitationem quam placeat quo adipisci? Tempora voluptatibus accusantium explicabo numquam nihil possimus obcaecati asperiores veritatis optio, qui quas et eaque culpa natus laudantium repudiandae quia officia, necessitatibus,
</div>
<div class="items" id="footer">
Lorem, ipsum dolor sit amet consectetur adipisicing elit. Vero consectetur dolore unde!
</div>
<div class="items">Items-1</div>
<div class="items">Items-2</div>
<div class="items">Items-3</div>
<div class="items">Items-4</div>
<div class="items">Items-5</div>
<div class="items">Items-6</div>
<div class="items">Items-7</div>
<div class="items">Items-8</div>
<div class="items">Items-9</div>
<div class="items">Items-10</div>
<div class="items">Items-11</div>
<div class="items">Items-12</div>
<div class="items">Items-13</div>
<div class="items">Items-14</div>
</div>
</body>
</html>
AUTOFIT AND MINMAX IN CSS GRID: TUT43AUTOFIT.HTML
<!DOCTYPE html>
<html lang="en">
<head>
<!-- MAIN POINT IS AAPKE AAPKE DEVELOPER KO DIKKAT NHI HONI CHAHIYE WEBSITE KO MAINTAIN KARNE ME & developing times ka dhyab rakhna hai, USE GRID/FLOAT/FLEXBOX IN WHICH YOU ARE COMFORTABLE/ -->
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>AUTOFIT AND MINMAX IN CSS</title>
<style>
.container{
display: grid;
grid-gap: 1rem;
grid-template-columns: 112px 112px 112px;
/* grid-template-columns: 1fr 1fr 1fr; */
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
/* justify-content: center; */
}
.box{
border: 2px solid black;
background-color: aqua;
padding: 34px;
/* margin: 4px; */
}
</style>
</head>
<body>
<div class="container">
<div class="box">Item-1</div>
<div class="box">Item-2</div>
<div class="box">Item-3</div>
<div class="box">Item-4</div>
<div class="box">Item-5</div>
<div class="box">Item-6</div>
<div class="box">Item-7</div>
<div class="box">Item-8</div>
<div class="box">Item-9</div>
<div class="box">Item-10</div>
<div class="box">Item-11</div>
<div class="box">Item-12</div>
<div class="box">Item-13</div>
<div class="box">Item-14</div>
<div class="box">Item-15</div>
</div>
</body>
</html>
GRID SPAN IN CSS: TUT42SPAN.HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>grid span IN CSS </title>
<style>
.grid{
display: grid;
grid-template-columns:repeat(5, 2fr) ;
}
.box{
border: 2px solid black;
background-color: aquamarine;
margin: 4px;
padding: 23px;
}
/* WE CAN USE GRID, FLOAT SYSTEM OR FLEXBOX IN WHICH WE ARE COMFORTABLE; br must not use */
.box:first-child{
/* grid-column-start: 1;
grid-column-end: 3;
grid-row-start: 1;
grid-row-end: 3; */
/* grid-column: 3 / span 3; */
/*3rd column se start krega aur 3 column ka space ye khud le lega*/
grid-row: 2 / span 3;
/*2nd row se start krega aur 3 row ka space ye khud le lega*/
}
</style>
</head>
<body>
<div class="grid">
<div class="box">Item-1</div>
<div class="box">Item-2</div>
<div class="box">Item-3</div>
<div class="box">Item-4</div>
<div class="box">Item-5</div>
<div class="box">Item-6</div>
<div class="box">Item-7</div>
<div class="box">Item-8</div>
<div class="box">Item-1</div>
<div class="box">Item-2</div>
<div class="box">Item-3</div>
<div class="box">Item-4</div>
<div class="box">Item-5</div>
<div class="box">Item-6</div>
<div class="box">Item-7</div>
</div>
</body>
</html>
CSS GRID TUTORIALS: TUT40&41GRID.HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CSS Grid Tutorial</title>
<style>
/*# USED TO DESIGEN PAGE LAYOUT */
/*# GRID PROPERTY ALWAYS APPLY IN CONTAINER WHICH HAVE DISPLAY:GRID */
.container {
display: grid;
/* grid-template-columns:300px 200px 100px; */
/* grid-template-columns:300px auto 100px; */
/* grid-template-columns:2fr 1fr 2fr; */
grid-template-columns: repeat(3, auto);
/*#repeat(no of columns, width of columns)*/
/* grid-gap: 2rem; */
/*#grid-gap means space between two lines*/
/* grid-template-rows: 2fr 3fr 2fr; */
grid-template-rows: repeat(2, 5fr);
/*#repeat(no of rows on which property will apply, width of rows)*/
grid-auto-rows: 2fr;
/*grid-auto-rows: ; apply for remainder items*/
grid-column-gap: 5rem;
grid-row-gap: 5rem;
}
.items {
/* height: 100px;
width: 100px; */
border: 2px solid black;
background-color: red;
margin: 2px;
padding: 5px;
}
</style>
</head>
<body>
<!-- .container+enter
.items{This is item-$}*10 -->
<div class="container">
<div class="items">This is item-1</div>
<div class="items">This is item-2</div>
<div class="items">This is item-3</div>
<div class="items">This is item-4</div>
<div class="items">This is item-5</div>
<div class="items">This is item-6</div>
<div class="items">This is item-7</div>
<div class="items">This is item-8</div>
<div class="items">This is item-9</div>
<div class="items">This is item-10</div>
</body>
</html>
Transform property in CSS : tut38transform.html
Transform : T R S S
T: TRANSLATE(to move the box in x or y direction), R: ROTATE(to rotate the box in deg)
S: SKEW(to skew the box in deg) , S:SCALE( to be scaled twice or thrice
T: TRANSLATE(to move the box in x or y direction), R: ROTATE(to rotate the box in deg)
S: SKEW(to skew the box in deg) , S:SCALE( to be scaled twice or thrice
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>transform property in CSS</title>
<style>
* {
margin: 0px;
padding: 0px;
}
.container {
background-color: aqua;
display: flex;
align-items: center;
justify-content: center;
height: 100vh;
}
.box {
display: flex;
align-items: center;
justify-content: center;
height: 300px;
width: 300px;
border: 3px solid blue;
background-color: greenyellow;
border-radius: 50px;
/* transform: rotate(45deg); */
transition: all 15s ease-in-out 0s;
}
.box:hover {
/* remember TRICK; T:TRSS */
transform: rotate(3600000deg);
/* transform: skew(60deg); */
/* transform: scale(2); */
/* transform: translateX(123px); */
/* transform: translatey(123px); */
/* transform: translate(123px,123px); */
/* transform: translate3d(123px, 123px, 123px); */
}
</style>
</head>
<body>
<div class="container">
<div class="box">
This is a box
</div>
</div>
</body>
</html>
Comments