index.html file is a simple home page which contain div which on click direct you the three repective page A1 - A3
A1.html file contains a div with a class .boxbody which conatians all the 12 box which are present in the webpage. These box each contains a letter from A-L sequencaly. Each box contain the class .box and unqiue id .box1 to .box12.
A1style.css file contains two keyframes firstleft and firstright.
.boxbody is first place in the center by using display:flex and justify-content: center. After which the .boxbody is made a grid with varing number of column depending upon the max-width of the viewport.
- Upto 900px there is only 1 column
- then from 901px to 1200px there is 2 column
- the from 1201px onward there is 3 columns
for all the alternate row from the first row
firstleftanimation was applied and for all the alternate row from the second rowfirstrightanimation was applied. These animation was applied using nth-child pseudo selector
A2.html there is a div with class .boxbody containing two div .box1 and .box2`. Each of this box contains 6 div which represent each all the 6 faces of the box.
A2style.css first .box1 and .box2 are made grid with 1 row and 1 column so all the faces can overlap. After that each faces is give position : relative and each face is given and each face is moved using top and left property such that they represent a box's net diagram. Then each faces is rotated using transform: rotateX() and rotated transform: rotateY() to make a box
- for
.box1transform-style: preserve-3dis used and then rotate in Y axis to -30deg and perpective of 300px and on hover these transformation are removed with an transition - for
box2perspectiveis set to 200px andpresepective-originis set to 200px -50px. On hover the transform property of.box2facesare remove andtranslateZ(-20px)is set.
A3.html conatians a div of class .conntainer which holds 5 divs 4 empty div for each box have different color and 1 for the text Hi!.
A3style.css first div .container was centered. The .containere was made display: grid with 2 row and 2 column of 200px by 200px.
.box has height and width of 200px. and each .box background-color was assigned. Each .box transfrom-origin is set with repect to their position.
.text was made to span 2 row and 2 column such that is overlaps with all the .box. and centered it using display: flex.
On hover .container, .box were rotated with transition.