├── README.md ├── first.css ├── five.css ├── four.css ├── index4.html ├── index5.html ├── index6.html ├── second.css ├── six.css ├── starting.css ├── style1.css ├── style2.css ├── style3.css ├── style4.css └── third.css /README.md: -------------------------------------------------------------------------------- 1 | # CSS 2 | Learn CSS 3 | -------------------------------------------------------------------------------- /first.css: -------------------------------------------------------------------------------- 1 | /* 2 | Element Styling 3 | p { 4 | color: green; 5 | } 6 | p { 7 | color: red; 8 | } 9 | 10 | Name Conventions And Rules 11 | 12 | ._test { 13 | color: red; 14 | } 15 | .user-test { 16 | color: red; 17 | } 18 | 19 | Background - Color, Image, Repeat 20 | 21 | div { 22 | background-color: red; 23 | background-color: rgb(0 0 0 / 50%); 24 | background-color: #FF0000; 25 | background-image: url("../imgs/learn-programming.png"); 26 | background-repeat: no-repeat; 27 | } 28 | 29 | 30 | 31 | Background – Attachment, Position, Size 32 | div { 33 | 34 | background-color: rgb(0 0 0 / 50%); 35 | background-color: #FF0000; 36 | background-image: url("../imgs/learn-programming.png"); 37 | background-repeat: no-repeat; 38 | background-attachment: fixed; 39 | background-position: left top; 40 | background-size: auto; 41 | 42 | 43 | Padding 44 | 45 | div { 46 | background-color: #DDD; 47 | 48 | /* Top Right Bottom Left */ 49 | /* 10px 10px 10px 10px */ 50 | /* padding: 10px; */ 51 | 52 | /* Top Right Bottom Left */ 53 | /* 10px 20px 10px 20px */ 54 | /* padding: 10px 20px; */ 55 | 56 | /* Top Right Bottom Left */ 57 | /* 10px 20px 15px 20px */ 58 | /* padding: 10px 20px 15px; 59 | 60 | padding-bottom: 10px; 61 | padding-top: 10px; 62 | } 63 | 64 | Margin 65 | 66 | div { 67 | background-color: #DDD; 68 | padding: 10px; 69 | width: 70%; 70 | margin: auto; 71 | } 72 | 73 | Border 74 | 75 | div { 76 | background-color: #DDD; 77 | padding: 10px; 78 | width: 70%; 79 | margin: auto; 80 | border-width: 10px; 81 | border-color: red; 82 | border-style: solid; 83 | border: 10px solid red; 84 | } 85 | 86 | Outline 87 | 88 | div { 89 | background-color: #DDD; 90 | width: 300px; 91 | padding: 10px; 92 | outline: 10px solid red; 93 | border: 10px solid blue; 94 | } 95 | 96 | Display – Block, Inline-Block, Inline 97 | 98 | Block 99 | 100 | - Take Full Width If No Width 101 | - Add Line Break 102 | - Respect Padding, Margin, Width, Height 103 | 104 | Inline 105 | 106 | - Do Not Repsepct Width, Height 107 | - Respect Padding And Margin [ Just Wight + Left ] 108 | - Do Not Add Line Break 109 | - Allow Elements Before And After It in The Same Line 110 | 111 | Inline-Block 112 | 113 | - Allow Elements Before And After It in The Same Line 114 | - Respect Padding, Margin, Width, Height 115 | 116 | 117 | 118 | span { 119 | background-color: #EEE; 120 | display: inline-block; 121 | } 122 | 123 | Element Visibility And Use Cases 124 | 125 | 126 | div { 127 | background-color: red; 128 | margin: 10px 0; 129 | } 130 | .first { 131 | visibility: hidden; 132 | } 133 | 134 | 135 | Grouping Multiple Selectors 136 | 137 | .one { 138 | border-bottom: 2px solid red; 139 | color: red; 140 | } 141 | .two { 142 | border-bottom: 2px solid green; 143 | color: green; 144 | } 145 | .three { 146 | border-bottom: 2px solid blue; 147 | color: blue; 148 | } 149 | .four { 150 | border-bottom: 2px solid black; 151 | color: black; 152 | } 153 | .one, 154 | .two, 155 | .three, 156 | .four, 157 | .my-p { 158 | padding: 15px; 159 | margin: 12px 0; 160 | background-color: #ededed; 161 | } 162 | 163 | Nesting 164 | 165 | div .special { 166 | color: red; 167 | } 168 | 169 | 170 | Dimensions - Width And Height 171 | 172 | div { 173 | background-color: red; 174 | padding: 10px; 175 | display: inline-block; 176 | max-width: 400px; 177 | } 178 | 179 | 180 | Overflow – Overflow-X And Overflow-Y 181 | 182 | div { 183 | width: 150px; 184 | height: 150px; 185 | background-color: #EEE; 186 | margin: 20px auto; 187 | border-radius: 6px; 188 | overflow: scroll; 189 | } 190 | 191 | Text – Color And Shadow 192 | 193 | div { 194 | background-color: #f9f9f9; 195 | color: rebeccapurple; 196 | text-shadow: 0 0 0 red; 197 | } 198 | 199 | 200 | Text – Alignment 201 | 202 | div { 203 | background-color: #f9f9f9; 204 | text-align: center; 205 | direction: ltr; 206 | } 207 | img { 208 | vertical-align: middle; 209 | } 210 | 211 | Text – Decoration And Transform 212 | 213 | div { 214 | background-color: #f9f9f9; 215 | text-transform: capitalize; 216 | } 217 | 218 | Decoration And Transform 219 | div { 220 | background-color: #f9f9f9; 221 | word-spacing: 5px; 222 | } 223 | 224 | Text – Spacing 225 | div { 226 | background-color: #f9f9f9; 227 | word-spacing: 5px; 228 | } 229 | 230 | Overflow And Use Cases 231 | 232 | div { 233 | background-color: #ddd; 234 | padding: 10px; 235 | width: 200px; 236 | white-space: nowrap; 237 | overflow: hidden; 238 | text-overflow: ellipsis; 239 | } 240 | div:hover { 241 | overflow: visible; 242 | } 243 | 244 | Inheritance 245 | 246 | div { 247 | text-align: center; 248 | padding: 20px; 249 | background-color: #EEE; 250 | font-size: 20px; 251 | border: 2px solid blue; 252 | } 253 | div p { 254 | border: 2px solid; 255 | border-color: inherit; 256 | padding: inherit; 257 | } 258 | 259 | Typography – Font Family 260 | 261 | .with-ser { 262 | font-family: 'Times New Roman', Times, serif; 263 | } 264 | .san-ser { 265 | font-family: Arial, Helvetica, sans-serif; 266 | } 267 | .with-ser, 268 | .san-ser { 269 | background-color: #EEE; 270 | padding: 10px; 271 | } 272 | 273 | Typography – Font Size And CSS Units 274 | 275 | body { 276 | font-size: 40px; 277 | } 278 | div { 279 | font-size: 5vw; 280 | } 281 | div span { 282 | font-size: 2rem; 283 | } 284 | 285 | Typography – Font Style And Variant And Weight 286 | 287 | div { 288 | font-variant: small-caps; 289 | font-weight: bold; 290 | } 291 | p { 292 | text-transform: uppercase; 293 | } 294 | 295 | 296 | Mouse Cursor 297 | 298 | button { 299 | background: transparent; 300 | border: none; 301 | color: red; 302 | font-weight: bold; 303 | cursor: pointer; 304 | } 305 | 306 | 307 | Float And Clear 308 | 309 | .parent { 310 | background-color: red; 311 | padding: 10px; 312 | } 313 | .parent div { 314 | padding-top: 10px; 315 | padding-bottom: 10px; 316 | text-align: center; 317 | background-color: #eee; 318 | width: 25%; 319 | float: left; 320 | } 321 | .clear { 322 | clear: both; 323 | } 324 | 325 | Mastering The CSS Calculation 326 | 327 | 328 | body { 329 | margin: 0; 330 | } 331 | div { 332 | padding-top: 10px; 333 | padding-bottom: 10px; 334 | text-align: center; 335 | background-color: #eee; 336 | float: left; 337 | width: calc((100% - 60px) / 5); 338 | margin-left: 10px; 339 | } 340 | 341 | Content Width Is: 100% 342 | 6 Spaces 10px * 6 => 60px From Content Width 343 | 100% - 60px Available Space 344 | 5 Elements The Width Is: (100% - 60px) / 5 345 | 346 | 347 | 348 | 349 | */ 350 | 351 | 352 | 353 | 354 | 355 | -------------------------------------------------------------------------------- /five.css: -------------------------------------------------------------------------------- 1 | /* 3D Transform – Rotate 2 | 3 | div { 4 | margin: 200px auto; 5 | width: 200px; 6 | height: 200px; 7 | background-color: rgb(255 0 0 / 39%); 8 | color: white; 9 | display: flex; 10 | justify-content: center; 11 | align-items: center; 12 | font-weight: bold; 13 | font-size: 30px; 14 | transform: rotateX(50deg); 15 | transform: rotateY(50deg); 16 | transform: rotateZ(50deg); 17 | transform: rotate3d(0, 1, 1, 65deg); 18 | } 19 | 20 | 3D Transform - Translate, Perspective, Perspective Origin 21 | 22 | .shape { 23 | perspective: 300px; 24 | perspective-origin: center center; 25 | } 26 | .shape div { 27 | margin: 200px auto; 28 | width: 200px; 29 | height: 200px; 30 | background-color: rgb(255 0 0 / 39%); 31 | color: white; 32 | display: flex; 33 | justify-content: center; 34 | align-items: center; 35 | font-weight: bold; 36 | font-size: 30px; 37 | transform: translate(100px, -100px); 38 | transform: translateX(100px); 39 | transform: translateZ(100px); 40 | transform: translate3d(0, 0, 100px); 41 | } 42 | 43 | 3D Transform – Backface Visibility And Flip Product 44 | 45 | 46 | * { 47 | box-sizing: border-box; 48 | margin: 0; 49 | } 50 | .container { 51 | margin: 40px auto; 52 | width: 200px; 53 | perspective: 600px; 54 | } 55 | .box { 56 | position: relative; 57 | width: 200px; 58 | height: 200px; 59 | transform-style: preserve-3d; 60 | transition: transform 1s; 61 | transform-origin: right center; 62 | } 63 | .box:hover { 64 | transform: translateX(-100%) rotateY(-180deg); 65 | } 66 | .box .face { 67 | position: absolute; 68 | width: 100%; 69 | height: 100%; 70 | display: flex; 71 | justify-content: center; 72 | align-items: center; 73 | font-weight: bold; 74 | font-size: 30px; 75 | color: white; 76 | backface-visibility: hidden; 77 | } 78 | .box .front { 79 | background-color: red; 80 | } 81 | .box .back { 82 | background-color: green; 83 | transform: rotateY(180deg); 84 | } 85 | 86 | 87 | Animation - KeyFrames, Name, Duration 88 | 89 | /* 90 | Animation 91 | - KeyFrames 92 | - Name 93 | - Duration 94 | 95 | 96 | * { 97 | box-sizing: border-box; 98 | margin: 0; 99 | } 100 | body { 101 | font-family: Arial, Helvetica, sans-serif; 102 | } 103 | div { 104 | width: 100px; 105 | height: 100px; 106 | background-color: red; 107 | position: absolute; 108 | left: 50%; 109 | top: 50%; 110 | display: flex; 111 | justify-content: center; 112 | align-items: center; 113 | color: white; 114 | transform: translate(-50%, -50%); 115 | animation-name: change-color; 116 | animation-duration: 2s; 117 | } 118 | /* Code One 119 | @keyframes change-color { 120 | from { 121 | background-color: red; 122 | } 123 | to { 124 | background-color: blue; 125 | } 126 | } 127 | /* Code Two 128 | @keyframes change-color { 129 | 0% { 130 | background-color: red; 131 | } 132 | 100% { 133 | background-color: blue; 134 | } 135 | } 136 | /* Code Three 137 | @keyframes change-color { 138 | 0% { 139 | background-color: red; 140 | } 141 | 5% { 142 | background-color: blue; 143 | } 144 | 80% { 145 | background-color: black; 146 | } 147 | 100% { 148 | background-color: red; 149 | } 150 | } 151 | 152 | 153 | Animation – Iteration Count, Timing Function, Spinner Loading 154 | 155 | /* 156 | Animation 157 | - Iteration Count 158 | - Timing Function 159 | - Spinner Loading 160 | 161 | 162 | * { 163 | box-sizing: border-box; 164 | margin: 0; 165 | } 166 | body { 167 | font-family: Arial, Helvetica, sans-serif; 168 | } 169 | div { 170 | width: 100px; 171 | height: 100px; 172 | background-color: #e8e3e3; 173 | position: absolute; 174 | left: 50%; 175 | top: 50%; 176 | margin-left: -50px; 177 | margin-top: -50px; 178 | border-radius: 50%; 179 | border: 5px solid #e91e63; 180 | transition: transform 0.3s; 181 | border-left-color: transparent; 182 | animation-name: spin; 183 | animation-duration: 1s; 184 | animation-iteration-count: infinite; 185 | animation-timing-function: linear; 186 | } 187 | @keyframes spin { 188 | 0% { 189 | transform: rotate(0deg); 190 | } 191 | 100% { 192 | transform: rotate(360deg); 193 | } 194 | } 195 | 196 | Animation - Direction, Fill Mode, Play State, Delay 197 | 198 | /* 199 | Animation 200 | - Iteration Count 201 | - Timing Function 202 | - Spinner Loading 203 | 204 | 205 | * { 206 | box-sizing: border-box; 207 | margin: 0; 208 | } 209 | body { 210 | font-family: Arial, Helvetica, sans-serif; 211 | } 212 | div { 213 | width: 100px; 214 | height: 100px; 215 | background-color: #e8e3e3; 216 | position: absolute; 217 | left: 50%; 218 | top: 50%; 219 | margin-left: -50px; 220 | margin-top: -50px; 221 | animation-name: coloring; 222 | animation-duration: 5s; 223 | animation-iteration-count: 1; 224 | animation-timing-function: linear; 225 | animation-direction: reverse; 226 | animation-delay: -2s; 227 | animation-fill-mode: both; 228 | animation-play-state: running; 229 | animation: coloring 3s linear 2s infinite reverse; 230 | } 231 | div:hover { 232 | animation-play-state: paused; 233 | } 234 | @keyframes coloring { 235 | 0% { 236 | background-color: red; 237 | } 238 | 50% { 239 | background-color: blue; 240 | } 241 | 100% { 242 | background-color: black; 243 | } 244 | } 245 | 246 | 247 | Up And Down Loading Animation Training 248 | /* 249 | Loading Animation 250 | 251 | 252 | * { 253 | box-sizing: border-box; 254 | margin: 0; 255 | } 256 | body { 257 | font-family: Arial, Helvetica, sans-serif; 258 | background-color: #333; 259 | } 260 | .load { 261 | display: flex; 262 | justify-content: center; 263 | margin: 50px auto; 264 | } 265 | .load div { 266 | width: 20px; 267 | height: 20px; 268 | background-color: orchid; 269 | border-radius: 50%; 270 | margin: 0 5px; 271 | animation-name: up-and-down; 272 | animation-duration: 0.9s; 273 | animation-iteration-count: infinite; 274 | animation-direction: alternate; 275 | } 276 | .load .two { 277 | animation-delay: 0.3s; 278 | } 279 | .load .three { 280 | animation-delay: 0.6s; 281 | } 282 | @keyframes up-and-down { 283 | to { 284 | opacity: 0.2; 285 | transform: translateY(-20px); 286 | } 287 | } 288 | 289 | 290 | Selectors Reference Part 1 291 | 292 | /* 293 | CSS Selectors 294 | - * 295 | - Element => [p, div, h2] 296 | - Element OtherElement => div p 297 | - .class-name 298 | - #id-name 299 | - .parent .child 300 | - .class-one.class-two 301 | - .class-name div, .class-name p 302 | - Element.class-name => p.class-name 303 | - .parent > .child => Direct Child 304 | 305 | 306 | * { 307 | box-sizing: border-box; 308 | margin: 0; 309 | } 310 | body { 311 | font-family: Arial, Helvetica, sans-serif; 312 | } 313 | 314 | Selectors Reference Part 2 315 | 316 | 317 | 318 | /* 319 | CSS Selectors 320 | - :first-child 321 | - :last-child 322 | - :first-of-type 323 | - :last-of-type 324 | - :only-child 325 | 326 | CSS Selectors Reference Part 3 327 | 328 | * { 329 | box-sizing: border-box; 330 | margin: 0; 331 | } 332 | body { 333 | font-family: Arial, Helvetica, sans-serif; 334 | } 335 | 336 | 337 | 338 | 339 | 340 | 341 | */ 342 | -------------------------------------------------------------------------------- /four.css: -------------------------------------------------------------------------------- 1 | /* 2 | Grid - Parent - Template Columns 3 | 4 | /* 5 | Grid 6 | Parent 7 | - display: grid | inline-grid 8 | - grid-template-columns: [Number Of Columns In] => [Px, %, Auto, Repeat] 9 | 10 | 11 | * { 12 | box-sizing: border-box; 13 | } 14 | .parent { 15 | margin: 20px auto; 16 | width: 800px; 17 | height: 500px; 18 | background-color: #ddd; 19 | display: grid; 20 | grid-template-columns: repeat(2, auto) repeat(2, 1fr); 21 | } 22 | .parent div { 23 | background-color: red; 24 | color: white; 25 | padding: 20px; 26 | font-size: 30px; 27 | font-weight: bold; 28 | text-align: center; 29 | } 30 | 31 | 32 | Grid - Parent - Template Rows And Gap 33 | 34 | 35 | /* 36 | Grid 37 | Parent 38 | - display: grid | inline-grid 39 | - grid-template-columns: [Number Of Columns In] => [Px, %, Auto, Fraction, Repeat, Mix] 40 | - grid-template-rows: [Number Of Rows In] => [Px, %, Auto, Fraction, Repeat, Mix] 41 | - gap: [Row Gap] [Column Gap] 42 | 43 | 44 | * { 45 | box-sizing: border-box; 46 | } 47 | .parent { 48 | margin: 20px auto; 49 | width: 800px; 50 | height: 500px; 51 | background-color: #ddd; 52 | display: grid; 53 | grid-template-columns: repeat(4, 1fr); 54 | grid-template-rows: repeat(3, 1fr); 55 | /* row-gap: 10px; 56 | column-gap: 10px; 57 | gap: 10px 10px; 58 | } 59 | .parent div { 60 | background-color: red; 61 | color: white; 62 | padding: 20px; 63 | font-size: 30px; 64 | font-weight: bold; 65 | text-align: center; 66 | } 67 | 68 | 69 | Grid – Parent – Justify And Align Content 70 | 71 | 72 | /* 73 | Grid 74 | Parent 75 | - display: grid | inline-grid 76 | - grid-template-columns: [Number Of Columns In] => [Px, %, Auto, Fraction, Repeat, Mix] 77 | - grid-template-rows: [Number Of Rows In] => [Px, %, Auto, Fraction, Repeat, Mix] 78 | - gap: [Row Gap] [Column Gap] 79 | - justify-content 80 | - align-content 81 | 82 | 83 | * { 84 | box-sizing: border-box; 85 | } 86 | .parent { 87 | margin: 20px auto; 88 | width: 800px; 89 | height: 500px; 90 | background-color: #ddd; 91 | display: grid; 92 | grid-template-columns: repeat(4, auto); 93 | grid-template-rows: repeat(3, auto); 94 | gap: 10px 10px; 95 | justify-content: space-between; 96 | align-content: space-between; 97 | } 98 | .parent div { 99 | background-color: red; 100 | color: white; 101 | padding: 20px; 102 | font-size: 30px; 103 | font-weight: bold; 104 | text-align: center; 105 | } 106 | 107 | 108 | - Grid - Parent - Complete Layout With Template 109 | 110 | /* 111 | Grid 112 | Parent 113 | - display: grid | inline-grid 114 | - grid-template-columns: [Number Of Columns In] => [Px, %, Auto, Fraction, Repeat, Mix] 115 | - grid-template-rows: [Number Of Rows In] => [Px, %, Auto, Fraction, Repeat, Mix] 116 | - gap: [Row Gap] [Column Gap] 117 | - justify-content 118 | - align-content 119 | 120 | 121 | * { 122 | box-sizing: border-box; 123 | padding: 0; 124 | margin: 0; 125 | } 126 | ul { 127 | list-style: none; 128 | } 129 | ul li { 130 | display: inline-block; 131 | } 132 | .page { 133 | height: 100vh; 134 | background-color: #eee; 135 | display: grid; 136 | grid-template-columns: repeat(10, 1fr); 137 | grid-template-rows: 50px auto 50px; 138 | grid-template-areas: 139 | "logo logo nav nav nav nav nav nav nav nav" 140 | "cont cont cont cont cont cont cont . side side" 141 | "foot foot foot foot foot foot foot foot foot foot"; 142 | } 143 | h2 { 144 | grid-area: logo; 145 | background-color: red; 146 | color: white; 147 | } 148 | nav { 149 | grid-area: nav; 150 | background-color: blue; 151 | color: white; 152 | } 153 | section { 154 | grid-area: cont; 155 | background-color: yellow; 156 | color: white; 157 | } 158 | aside { 159 | grid-area: side; 160 | background-color: green; 161 | color: white; 162 | } 163 | footer { 164 | grid-area: foot; 165 | background-color: black; 166 | color: white; 167 | } 168 | 169 | 170 | Grid – Child – Grid Column And Row 171 | 172 | /* 173 | Grid 174 | Parent 175 | - display: grid | inline-grid 176 | - grid-template-columns: [Number Of Columns In] => [Px, %, Auto, Fraction, Repeat, Mix] 177 | - grid-template-rows: [Number Of Rows In] => [Px, %, Auto, Fraction, Repeat, Mix] 178 | - gap: [Row Gap] [Column Gap] 179 | - justify-content 180 | - align-content 181 | - grid-template-areas 182 | Child 183 | - grid-column: [Grid-Column-Start] [Grid-Column-End] 184 | - grid-row: [Grid-Row-Start] [Grid-Row-End] 185 | 186 | 187 | * { 188 | box-sizing: border-box; 189 | } 190 | .parent { 191 | margin: 20px auto; 192 | width: 800px; 193 | height: 500px; 194 | background-color: #ddd; 195 | display: grid; 196 | grid-template-columns: repeat(6, 1fr); 197 | grid-template-rows: repeat(3, auto); 198 | gap: 10px 10px; 199 | } 200 | .parent div { 201 | background-color: red; 202 | color: white; 203 | padding: 20px; 204 | font-size: 30px; 205 | font-weight: bold; 206 | text-align: center; 207 | } 208 | 209 | 210 | Grid – Child – Grid Area And Trainings 211 | 212 | 213 | /* 214 | Grid 215 | Parent 216 | - display: grid | inline-grid 217 | - grid-template-columns: [Number Of Columns In] => [Px, %, Auto, Fraction, Repeat, Mix] 218 | - grid-template-rows: [Number Of Rows In] => [Px, %, Auto, Fraction, Repeat, Mix] 219 | - gap: [Row Gap] [Column Gap] 220 | - justify-content 221 | - align-content 222 | - grid-template-areas 223 | Child 224 | - grid-column: [Grid-Column-Start] [Grid-Column-End] 225 | - grid-row: [Grid-Row-Start] [Grid-Row-End] 226 | - grid-area: [Grid-Row-Start] [Grid-Column-Start] [Grid-Row-End] [Grid-Column-End] 227 | 228 | 229 | * { 230 | box-sizing: border-box; 231 | } 232 | .parent { 233 | margin: 20px auto; 234 | width: 800px; 235 | height: 500px; 236 | background-color: #ddd; 237 | display: grid; 238 | grid-template-columns: repeat(6, 1fr); 239 | grid-template-rows: repeat(3, auto); 240 | gap: 10px 10px; 241 | } 242 | .parent div { 243 | background-color: red; 244 | color: white; 245 | padding: 20px; 246 | font-size: 30px; 247 | font-weight: bold; 248 | text-align: center; 249 | } 250 | 251 | 252 | Min, Max And Auto Fill 253 | 254 | * { 255 | box-sizing: border-box; 256 | margin: 0; 257 | } 258 | .parent { 259 | margin: 20px auto; 260 | height: 500px; 261 | background-color: #ddd; 262 | display: grid; 263 | grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); 264 | } 265 | .parent div { 266 | background-color: red; 267 | color: white; 268 | padding: 20px; 269 | font-size: 30px; 270 | font-weight: bold; 271 | text-align: center; 272 | } 273 | 274 | 275 | 276 | 2D Transform – Scale 277 | 278 | 279 | div { 280 | margin: 200px auto; 281 | width: 200px; 282 | height: 200px; 283 | background-color: rgb(255 0 0 / 39%); 284 | color: white; 285 | display: flex; 286 | justify-content: center; 287 | align-items: center; 288 | font-weight: bold; 289 | font-size: 30px; 290 | transform: scaleX(2); 291 | transform: scaleY(2); 292 | transform: scale(2, 2); 293 | } 294 | 295 | 2D Transform - Rotate 296 | 297 | 298 | div { 299 | margin: 200px auto; 300 | width: 200px; 301 | height: 200px; 302 | background-color: rgb(255 0 0 / 39%); 303 | color: white; 304 | display: flex; 305 | justify-content: center; 306 | align-items: center; 307 | font-weight: bold; 308 | font-size: 30px; 309 | transform: rotate(45deg); 310 | transform: rotate(1turn); 311 | transform: rotate(0.5turn); 312 | transform: rotate(0.25turn); 313 | } 314 | 315 | 2D Transform – Skew 316 | 317 | h2 { 318 | position: relative; 319 | color: white; 320 | margin: 20px auto; 321 | width: fit-content; 322 | padding: 20px; 323 | } 324 | h2::before { 325 | content: ""; 326 | background-color: red; 327 | position: absolute; 328 | left: 0; 329 | top: 0; 330 | width: 100%; 331 | height: 100%; 332 | z-index: -1; 333 | transform: skewX(20deg); 334 | } 335 | div { 336 | margin: 200px auto; 337 | width: 200px; 338 | height: 200px; 339 | background-color: rgb(255 0 0 / 39%); 340 | color: white; 341 | display: flex; 342 | justify-content: center; 343 | align-items: center; 344 | font-weight: bold; 345 | font-size: 30px; 346 | transform: skewX(10deg); 347 | transform: skewX(-10deg); 348 | transform: skewY(10deg); 349 | transform: skewY(-10deg); 350 | transform: skew(10deg, 10deg); 351 | } 352 | 2D Transform – Matrix 353 | 354 | /* 355 | matrix(scaleX(), skewY(), skewX(), scaleY(), translateX(), translateY()) 356 | 357 | div { 358 | margin: 200px auto; 359 | width: 200px; 360 | height: 200px; 361 | background-color: rgb(255 0 0 / 39%); 362 | color: white; 363 | display: flex; 364 | justify-content: center; 365 | align-items: center; 366 | font-weight: bold; 367 | font-size: 30px; 368 | transform: matrix(1.2, 0.2679, 0, 1.2, 20, 20); 369 | transform: translateX(20px) translateY(20px) scaleX(1.2) skewY(15deg) skewX(0deg) scaleY(1.2); 370 | } 371 | 372 | 373 | Transform – Origin 374 | 375 | /* 376 | transform-origin 377 | Syntax 378 | Default Values => 50% 50% 0 379 | 2D Transform => transform-origin(X, Y) 380 | 3D Transform => transform-origin(X, Y, Z) 381 | X-Axis 382 | - CSS Unit [px, em, rem] 383 | - % 384 | - Keyword 385 | -- Left = 0% 386 | -- Center = 50% 387 | -- Right = 100% 388 | Y-Axis 389 | - CSS Unit [px, em, rem] 390 | - % 391 | - Keyword 392 | -- Top = 0% 393 | -- Center = 50% 394 | -- Bottom = 100% 395 | 396 | 397 | div { 398 | margin: 200px auto; 399 | width: 200px; 400 | height: 200px; 401 | background-color: rgb(255 0 0 / 39%); 402 | color: white; 403 | display: flex; 404 | justify-content: center; 405 | align-items: center; 406 | font-weight: bold; 407 | font-size: 30px; 408 | transform-origin: 0 50%; 409 | transform: rotate(100deg); 410 | } 411 | 412 | 413 | 414 | 415 | 416 | */ -------------------------------------------------------------------------------- /index4.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 | 8 | 351 | 352 | 353 | 354 | 355 | 356 | 357 | 358 | 359 | 360 | 361 | 362 | 363 | 364 | 365 | 366 | 367 | -------------------------------------------------------------------------------- /index5.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |This Is Our Paragraph
36 | 37 | third assignment css Elzero webschool 38 | 39 | 40 | fourth assignment css Elzero webschool 41 | 42 | 43 | 44 | fifth assignment css Elzero webschool 45 | 46 | 47 | /* valid 48 | ._user-name { 49 | } 50 | 51 | /* valid 52 | .-user-name { 53 | } 54 | 55 | /* valid 56 | .-user-name { 57 | } 58 | 59 | /* not valid 60 | .1user-name { 61 | } 62 | 63 | /* not valid 64 | .@user-name { 65 | } 66 | 67 | /* not valid 68 | .user@name { 69 | } 70 | 71 | /* valid 72 | ._user10name { 73 | } 74 | 75 | /* valid 76 | .u { 77 | } 78 | 79 | sixth assignment css Elzero webschool 80 | 81 | /* bad 82 | .USERNAME { 83 | } 84 | 85 | /* bad 86 | .UserName { 87 | } 88 | 89 | /* good 90 | .user-name { 91 | } 92 | 93 | /* bad 94 | .userName { 95 | } 96 | 97 | /* good 98 | .usernameprofile { 99 | } 100 | 101 | ------------------------------------------ 102 | 103 | first assignment css Elzero webschool 104 | 105 | 106 | .assign-1-shape-1 { 107 | width: 500px; 108 | background-color: blueviolet; 109 | padding: 20px; 110 | margin-left: auto; 111 | margin-right: auto; 112 | } 113 | 114 | .assign-1-shape-2 { 115 | width: 500px; 116 | background-color: rgb(138, 43, 226, 50%); 117 | padding: 20px; 118 | margin-left: auto; 119 | margin-right: auto; 120 | } 121 | 122 | .assign-1-shape-3 { 123 | width: 500px; 124 | background-color: rgb(138, 43, 226, 10%); 125 | padding: 20px; 126 | margin-left: auto; 127 | margin-right: auto; 128 | } 129 | 130 | 131 | second assignment css Elzero webschool 132 | 133 | 134 | .assign-2-shape-1 { 135 | width: 400px; 136 | height: 400px; 137 | background-image: url('css-assignment-5-8.png'); 138 | background-repeat: no-repeat; 139 | } 140 | 141 | .assign-2-shape-2 { 142 | width: 400px; 143 | height: 400px; 144 | background-image: url('css-assignment-5-8.png'); 145 | background-repeat: repeat-y; 146 | } 147 | 148 | .assign-2-shape-3 { 149 | width: 400px; 150 | height: 400px; 151 | background-image: url('css-assignment-5-8.png'); 152 | background-repeat: repeat-x; 153 | 154 | } 155 | 156 | .assign-2-shape-4 { 157 | width: 400px; 158 | height: 400px; 159 | background-image: url('css-assignment-5-8.png'); 160 | background-repeat: repeat; 161 | 162 | } 163 | 164 | third assignment css Elzero webschool 165 | 166 | .assign-3-shape-1 { 167 | width: 400px; 168 | height: 400px; 169 | background-image: url('css-assignment-5-8.png'); 170 | background-repeat: no-repeat; 171 | } 172 | 173 | .assign-3-shape-2 { 174 | width: 400px; 175 | height: 400px; 176 | background-image: url('css-assignment-5-8.png'); 177 | background-repeat: repeat-y; 178 | background-position: right; 179 | } 180 | 181 | .assign-3-shape-3 { 182 | width: 400px; 183 | height: 400px; 184 | background-image: url('css-assignment-5-8.png'); 185 | background-repeat: repeat-x; 186 | background-position: bottom; 187 | } 188 | 189 | .assign-3-shape-4 { 190 | width: 400px; 191 | height: 400px; 192 | background-image: url('css-assignment-5-8.png'); 193 | background-repeat: repeat; 194 | } 195 | 196 | fourth assignment css Elzero webschool 197 | 198 | .assign-4-shape-1 { 199 | width: 400px; 200 | height: 400px; 201 | background-image: url('css-assignment-5-8.png'); 202 | background-repeat: no-repeat; 203 | background-size: 80% 80%; 204 | } 205 | 206 | .assign-4-shape-2 { 207 | width: 400px; 208 | height: 400px; 209 | background-image: url('css-assignment-5-8.png'); 210 | background-repeat: repeat-y; 211 | background-position: right; 212 | background-size: 80% 100%; 213 | } 214 | 215 | .assign-4-shape-3 { 216 | width: 400px; 217 | height: 400px; 218 | background-image: url('css-assignment-5-8.png'); 219 | background-repeat: repeat-x; 220 | background-position: bottom; 221 | background-size: 100% 80%; 222 | } 223 | 224 | .assign-4-shape-4 { 225 | width: 400px; 226 | height: 400px; 227 | background-image: url('css-assignment-5-8.png'); 228 | background-repeat: no-repeat; 229 | background-size: 50% 50%; 230 | background-position: bottom right; 231 | } 232 | 233 | 234 | first assignment css Elzero webschool 235 | 236 | .Shape-1 { 237 | display: inline-block; 238 | border: 5px solid red; 239 | outline: 5px solid black; 240 | } 241 | 242 | .Shape-2 { 243 | display: inline-block; 244 | border-width: 5px; 245 | border-style: solid; 246 | border-color: blue green blue green; 247 | outline: 5px solid black; 248 | } 249 | 250 | .Shape-3 { 251 | display: inline-block; 252 | border-width: 5px; 253 | border-style: dashed; 254 | border-color: red green blue yellow; 255 | outline: 5px solid black; 256 | } 257 | 258 | 259 | second assignment css Elzero webschool 260 | 261 | div { 262 | margin-top: 20px; 263 | } 264 | 265 | .Shape-1 { 266 | width: 400px; 267 | background-color: #EEE; 268 | border-left: 5px; 269 | border-left-color: crimson; 270 | border-style: solid; 271 | border-top-color: #EEE; 272 | outline: #EEE solid 5px; 273 | border-bottom-color: #EEE; 274 | border-right-color: #EEE; 275 | padding: 0px 5px; 276 | 277 | } 278 | 279 | .Shape-2 { 280 | width: 400px; 281 | background-color: #EEE; 282 | border-left: 5px; 283 | border-left-color: crimson; 284 | border-style: solid; 285 | border-top-color: #EEE; 286 | outline: #EEE solid 5px; 287 | border-bottom-color: #EEE; 288 | border-right-color: #EEE; 289 | padding: 0px 5px; 290 | visibility: hidden; 291 | } 292 | 293 | .Shape-3 { 294 | width: 400px; 295 | background-color: #EEE; 296 | border-left: 5px; 297 | border-left-color: aqua; 298 | border-style: solid; 299 | border-top-color: #EEE; 300 | outline: #EEE solid 5px; 301 | border-bottom-color: #EEE; 302 | border-right-color: #EEE; 303 | padding: 0px 5px; 304 | } 305 | 306 | first assignment css Elzero webschool 307 | 308 | .parent div.child span { 309 | color: red; 310 | } 311 | 312 | .parent .title { 313 | color: blue; 314 | } 315 | 316 | div p, 317 | div.title { 318 | color: green; 319 | } 320 | 321 | second assignment css Elzero webschool 322 | 323 | div { 324 | background-color: brown; 325 | max-width: 400px; 326 | margin-top: 5px; 327 | height: 30px; 328 | width: fit-content; 329 | color: white; 330 | overflow: hidden; 331 | 332 | } 333 | 334 | */ 335 | -------------------------------------------------------------------------------- /style2.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | First assignment css Elzero webschool 4 | 5 | 6 | Any Element With Class Title 7 | .title { 8 | } 9 | 10 | /* Any Element With id nav 11 | #nav { 12 | } 13 | 14 | /* Any Element With tag div 15 | div { 16 | } 17 | 18 | /* Any Element With tag h2 19 | h2 { 20 | } 21 | 22 | second assignment css Elzero webschool 23 | 24 | 25 | 26 | 27 | 28 | 33 | 34 | 35 |This Is Our Paragraph
36 | 37 | third assignment css Elzero webschool 38 | 39 | 40 | fourth assignment css Elzero webschool 41 | 42 | 43 | 44 | fifth assignment css Elzero webschool 45 | 46 | 47 | /* valid 48 | ._user-name { 49 | } 50 | 51 | /* valid 52 | .-user-name { 53 | } 54 | 55 | /* valid 56 | .-user-name { 57 | } 58 | 59 | /* not valid 60 | .1user-name { 61 | } 62 | 63 | /* not valid 64 | .@user-name { 65 | } 66 | 67 | /* not valid 68 | .user@name { 69 | } 70 | 71 | /* valid 72 | ._user10name { 73 | } 74 | 75 | /* valid 76 | .u { 77 | } 78 | 79 | sixth assignment css Elzero webschool 80 | 81 | /* bad 82 | .USERNAME { 83 | } 84 | 85 | /* bad 86 | .UserName { 87 | } 88 | 89 | /* good 90 | .user-name { 91 | } 92 | 93 | /* bad 94 | .userName { 95 | } 96 | 97 | /* good 98 | .usernameprofile { 99 | } 100 | 101 | ------------------------------------------ 102 | 103 | first assignment css Elzero webschool 104 | 105 | 106 | .assign-1-shape-1 { 107 | width: 500px; 108 | background-color: blueviolet; 109 | padding: 20px; 110 | margin-left: auto; 111 | margin-right: auto; 112 | } 113 | 114 | .assign-1-shape-2 { 115 | width: 500px; 116 | background-color: rgb(138, 43, 226, 50%); 117 | padding: 20px; 118 | margin-left: auto; 119 | margin-right: auto; 120 | } 121 | 122 | .assign-1-shape-3 { 123 | width: 500px; 124 | background-color: rgb(138, 43, 226, 10%); 125 | padding: 20px; 126 | margin-left: auto; 127 | margin-right: auto; 128 | } 129 | 130 | 131 | second assignment css Elzero webschool 132 | 133 | 134 | .assign-2-shape-1 { 135 | width: 400px; 136 | height: 400px; 137 | background-image: url('css-assignment-5-8.png'); 138 | background-repeat: no-repeat; 139 | } 140 | 141 | .assign-2-shape-2 { 142 | width: 400px; 143 | height: 400px; 144 | background-image: url('css-assignment-5-8.png'); 145 | background-repeat: repeat-y; 146 | } 147 | 148 | .assign-2-shape-3 { 149 | width: 400px; 150 | height: 400px; 151 | background-image: url('css-assignment-5-8.png'); 152 | background-repeat: repeat-x; 153 | 154 | } 155 | 156 | .assign-2-shape-4 { 157 | width: 400px; 158 | height: 400px; 159 | background-image: url('css-assignment-5-8.png'); 160 | background-repeat: repeat; 161 | 162 | } 163 | 164 | third assignment css Elzero webschool 165 | 166 | .assign-3-shape-1 { 167 | width: 400px; 168 | height: 400px; 169 | background-image: url('css-assignment-5-8.png'); 170 | background-repeat: no-repeat; 171 | } 172 | 173 | .assign-3-shape-2 { 174 | width: 400px; 175 | height: 400px; 176 | background-image: url('css-assignment-5-8.png'); 177 | background-repeat: repeat-y; 178 | background-position: right; 179 | } 180 | 181 | .assign-3-shape-3 { 182 | width: 400px; 183 | height: 400px; 184 | background-image: url('css-assignment-5-8.png'); 185 | background-repeat: repeat-x; 186 | background-position: bottom; 187 | } 188 | 189 | .assign-3-shape-4 { 190 | width: 400px; 191 | height: 400px; 192 | background-image: url('css-assignment-5-8.png'); 193 | background-repeat: repeat; 194 | } 195 | 196 | fourth assignment css Elzero webschool 197 | 198 | .assign-4-shape-1 { 199 | width: 400px; 200 | height: 400px; 201 | background-image: url('css-assignment-5-8.png'); 202 | background-repeat: no-repeat; 203 | background-size: 80% 80%; 204 | } 205 | 206 | .assign-4-shape-2 { 207 | width: 400px; 208 | height: 400px; 209 | background-image: url('css-assignment-5-8.png'); 210 | background-repeat: repeat-y; 211 | background-position: right; 212 | background-size: 80% 100%; 213 | } 214 | 215 | .assign-4-shape-3 { 216 | width: 400px; 217 | height: 400px; 218 | background-image: url('css-assignment-5-8.png'); 219 | background-repeat: repeat-x; 220 | background-position: bottom; 221 | background-size: 100% 80%; 222 | } 223 | 224 | .assign-4-shape-4 { 225 | width: 400px; 226 | height: 400px; 227 | background-image: url('css-assignment-5-8.png'); 228 | background-repeat: no-repeat; 229 | background-size: 50% 50%; 230 | background-position: bottom right; 231 | } 232 | 233 | 234 | first assignment css Elzero webschool 235 | 236 | .Shape-1 { 237 | display: inline-block; 238 | border: 5px solid red; 239 | outline: 5px solid black; 240 | } 241 | 242 | .Shape-2 { 243 | display: inline-block; 244 | border-width: 5px; 245 | border-style: solid; 246 | border-color: blue green blue green; 247 | outline: 5px solid black; 248 | } 249 | 250 | .Shape-3 { 251 | display: inline-block; 252 | border-width: 5px; 253 | border-style: dashed; 254 | border-color: red green blue yellow; 255 | outline: 5px solid black; 256 | } 257 | 258 | 259 | second assignment css Elzero webschool 260 | 261 | div { 262 | margin-top: 20px; 263 | } 264 | 265 | .Shape-1 { 266 | width: 400px; 267 | background-color: #EEE; 268 | border-left: 5px; 269 | border-left-color: crimson; 270 | border-style: solid; 271 | border-top-color: #EEE; 272 | outline: #EEE solid 5px; 273 | border-bottom-color: #EEE; 274 | border-right-color: #EEE; 275 | padding: 0px 5px; 276 | 277 | } 278 | 279 | .Shape-2 { 280 | width: 400px; 281 | background-color: #EEE; 282 | border-left: 5px; 283 | border-left-color: crimson; 284 | border-style: solid; 285 | border-top-color: #EEE; 286 | outline: #EEE solid 5px; 287 | border-bottom-color: #EEE; 288 | border-right-color: #EEE; 289 | padding: 0px 5px; 290 | visibility: hidden; 291 | } 292 | 293 | .Shape-3 { 294 | width: 400px; 295 | background-color: #EEE; 296 | border-left: 5px; 297 | border-left-color: aqua; 298 | border-style: solid; 299 | border-top-color: #EEE; 300 | outline: #EEE solid 5px; 301 | border-bottom-color: #EEE; 302 | border-right-color: #EEE; 303 | padding: 0px 5px; 304 | } 305 | 306 | first assignment css Elzero webschool 307 | 308 | .parent div.child span { 309 | color: red; 310 | } 311 | 312 | .parent .title { 313 | color: blue; 314 | } 315 | 316 | div p, 317 | div.title { 318 | color: green; 319 | } 320 | 321 | second assignment css Elzero webschool 322 | 323 | div { 324 | background-color: brown; 325 | max-width: 400px; 326 | margin-top: 5px; 327 | height: 30px; 328 | width: fit-content; 329 | color: white; 330 | overflow: hidden; 331 | 332 | } 333 | 334 | first assignment css Elzero webschool 335 | 336 | div { 337 | text-shadow: 1px 0.5px red, 2px 1px blue, 3px 1.5px purple; 338 | font-family: sans-serif; 339 | letter-spacing: 1px; 340 | } 341 | 342 | second assignment css Elzero webschool 343 | 344 | .one { 345 | text-transform: uppercase; 346 | } 347 | 348 | .two { 349 | text-transform: capitalize; 350 | } 351 | 352 | .three { 353 | text-transform: lowercase; 354 | } 355 | 356 | .one, .two, .three { 357 | text-align: center; 358 | } 359 | 360 | third assignment css Elzero webschool 361 | 362 | div { 363 | width: 400px; 364 | margin: auto; 365 | background-color: #EEE; 366 | word-break: break-all; 367 | padding: 20px; 368 | } 369 | 370 | ......................... 371 | 372 | div { 373 | width: 400px; 374 | background-color: #EEE; 375 | padding: 20px; 376 | white-space: nowrap; 377 | overflow: hidden; 378 | } 379 | 380 | ......................... 381 | 382 | div { 383 | width: 400px; 384 | background-color: #EEE; 385 | padding: 20px; 386 | white-space: nowrap; 387 | overflow: hidden; 388 | text-overflow: ellipsis; 389 | } 390 | 391 | .......................... 392 | 393 | fourth assignment css Elzero webschool 394 | 395 | a { 396 | display: block; 397 | margin: auto; 398 | width: fit-content; 399 | text-transform: capitalize; 400 | font-family: sans-serif; 401 | text-decoration: none; 402 | background-color: #318f8f; 403 | padding: 5px 10px; 404 | color: white; 405 | border-bottom: 5px solid #114949; 406 | } 407 | 408 | 409 | First assignment css Elzero webschool 410 | 411 | 412 | div { 413 | border: 3px solid orangered; 414 | text-align: center; 415 | padding: 20px 25px; 416 | } 417 | 418 | p { 419 | border: inherit; 420 | padding: inherit; 421 | background-color: #EEE; 422 | font-size: 20px; 423 | } 424 | 425 | 426 | 427 | Second assignment css Elzero webschool 428 | 429 | 430 | 431 | 432 | 436 | 437 | 441 | 442 | 443 | 444 | .first { 445 | font-family: 'Open Sans'; 446 | font-weight: 300; 447 | font-style: italic; 448 | } 449 | 450 | .second { 451 | font-family: 'Cairo', sans-serif; 452 | } 453 | 454 | .third { 455 | font-family: 'Jomhuria'; 456 | } 457 | 458 | Third assignment css Elzero webschool 459 | 460 | html { 461 | font-size: 20px; 462 | } 463 | 464 | .first { 465 | font-size: 2.5rem; 466 | } 467 | 468 | .second { 469 | font-size: 2rem; 470 | } 471 | 472 | .third { 473 | font-size: 1.5rem; 474 | } 475 | 476 | 477 | first assignment css Elzero webschool 478 | 479 |Developers Rating
154 |Avatar | 158 |Group | 159 |Name | 160 |Points | 161 |Control | 162 |
---|---|---|---|---|
Ninja | 168 |ahmed mohamed | 169 |120 | 170 |171 | ViewDelete 172 | | 173 ||
Shades | 177 |shady nabil | 178 |180 | 179 |180 | ViewDelete 181 | | 182 ||
eman mohamed | 187 |160 | 188 | 189 |190 | ViewDelete 191 | | 192 |||
Valhala | 197 |mohamed ibrahim | 198 |190 | 199 |200 | ViewDelete 201 | | 202 ||
nour atef | 207 |110 | 208 |209 | ViewDelete 210 | | 211 |||
Union | 216 |mahmoud adel | 217 |90 | 218 |219 | ViewDelete 220 | | 221 |