File tree Expand file tree Collapse file tree 2 files changed +25
-20
lines changed
Expand file tree Collapse file tree 2 files changed +25
-20
lines changed Original file line number Diff line number Diff line change 1111 </ head >
1212
1313 < body >
14- < div class ="one "> </ div >
15- < div class ="two "> </ div >
16- < div class ="three "> </ div >
14+ < div class ="hero ">
15+ < div class ="hero-center ">
16+ < h1 > hello world</ h1 >
17+ < p >
18+ Lorem ipsum dolor sit amet consectetur adipisicing elit. Aut quos quia
19+ asperiores incidunt accusantium tenetur saepe, eaque sequi? Ipsum
20+ dicta illo corrupti voluptatibus minus explicabo quae officia odit
21+ consequuntur distinctio!
22+ </ p >
23+ </ div >
24+ </ div >
1725 </ body >
1826</ html >
Original file line number Diff line number Diff line change 11/*
2- transform:translate(),scale()rotate(),skew()
2+ transform:translate() - Hero Example
33*/
44
5- div {
6- width : 150px ;
7- height : 150px ;
8- display : inline-block;
5+ * {
6+ margin : 0 ;
97}
108
11- .one {
12- background : red ;
13- transform : translateX ( 75 px ) ;
9+ .hero {
10+ min-height : 100 vh ;
11+ position : relative ;
1412}
1513
16- .two {
17- background : blue;
18- transform : translateY (-40px );
19- }
20-
21- .three {
22- background : green;
23- /* transform: translateX(50%); */
24- transform : translate (200px , 200px );
14+ .hero-center {
15+ border : 2px solid red;
16+ position : absolute;
17+ top : 50% ;
18+ left : 50% ;
19+ transform : translate (-50% , -50% );
20+ min-width : 300px ;
21+ text-align : center;
2522}
You can’t perform that action at this time.
0 commit comments