|
| 1 | +body, html { |
| 2 | + height: 100%; |
| 3 | + margin: 0; |
| 4 | + font-family: Arial, Helvetica, sans-serif; |
| 5 | +} |
| 6 | + |
| 7 | +.hero-image { |
| 8 | + /* This is your "hero image" or "wide image." You will need to change feet.jpg to match your asset*/ |
| 9 | + |
| 10 | +background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url("feet.jpg"); |
| 11 | + height: 100%; |
| 12 | + background-attachment: fixed; |
| 13 | + background-position: center; |
| 14 | + background-repeat: no-repeat; |
| 15 | + background-size: cover; |
| 16 | + position: relative; |
| 17 | +} |
| 18 | + |
| 19 | +/* Places text in the middle of the image */ |
| 20 | + |
| 21 | +.hero-text { |
| 22 | + text-align: center; |
| 23 | + position: absolute; |
| 24 | + top: 50%; |
| 25 | + left: 50%; |
| 26 | + transform: translate(-50%, -50%); |
| 27 | + color: white; |
| 28 | + font-size: 250%; |
| 29 | + |
| 30 | + |
| 31 | +} |
| 32 | + |
| 33 | +.hero-text h2 { /* This section adds the text stylings for your hero block */ |
| 34 | + display: block; |
| 35 | + font-size: 0.67em; |
| 36 | + margin-block-start: 2.33em; |
| 37 | + margin-block-end: 2.33em; |
| 38 | + margin-inline-start: 0px; |
| 39 | + margin-inline-end: 0px; |
| 40 | + font-weight: bold; |
| 41 | +} |
| 42 | + |
| 43 | +/* This code controls that cool parallax image and scrolling effect. Change the image "feet4.jpg" below to match your asset.*/ |
| 44 | +/*You can always add more parllax assets on your web document, just follow the directions at the bottom of the index.html.*/ |
| 45 | +.parallax-1 { |
| 46 | + background-image: url("feet4.jpg"); |
| 47 | + |
| 48 | + /* Set a specific height */ |
| 49 | + height: 500px; |
| 50 | + |
| 51 | + /* control the parallax scrolling effect */ |
| 52 | + background-attachment: fixed; |
| 53 | + background-position: center; |
| 54 | + background-repeat: no-repeat; |
| 55 | + background-size: cover; |
| 56 | +} |
| 57 | + |
| 58 | + |
| 59 | +/* This section of css. helps organize images to position and center the image to scale nicely on all screens */ |
| 60 | + |
| 61 | +.center-small-image { |
| 62 | + display: block; |
| 63 | + margin-left: auto; |
| 64 | + margin-right: auto; |
| 65 | + width: 50%; |
| 66 | +} |
| 67 | + |
| 68 | +.center-large-image { |
| 69 | + display: block; |
| 70 | + margin-left: auto; |
| 71 | + margin-right: auto; |
| 72 | + width: 100%; |
| 73 | +} |
| 74 | + |
| 75 | + |
| 76 | +/*this css. element centers text elements*/ |
| 77 | + |
| 78 | +.centertext { |
| 79 | + text-align: center; |
| 80 | + |
| 81 | +} |
| 82 | + |
| 83 | +/* This css. section controls the paragraph chunks*/ |
| 84 | + |
| 85 | +.par-centertext { |
| 86 | + margin: auto; |
| 87 | + width: 50%; |
| 88 | + padding: 100px; |
| 89 | + font-size: 125%; |
| 90 | + |
| 91 | +} |
| 92 | + |
| 93 | + |
| 94 | +/*The following .css is responsible for your photo grid .row, .column, .column img and @ media all work together to create your responsive image displays. Change the images on index.html. Remember, the images need to be in your project file folder */ |
| 95 | + |
| 96 | +.row { |
| 97 | + display: flex; |
| 98 | + flex-wrap: wrap; |
| 99 | + padding: 0 4px; |
| 100 | + justify-content: center; |
| 101 | +} |
| 102 | + |
| 103 | +/* Create 3 equal columns that sit next to each other */ |
| 104 | +.column { |
| 105 | + flex: 25%; |
| 106 | + max-width: 25%; |
| 107 | + padding: 0 4px; |
| 108 | +} |
| 109 | + |
| 110 | +.column img { |
| 111 | + margin-top: 8px; |
| 112 | + vertical-align: middle; |
| 113 | + width: 100%; |
| 114 | +} |
| 115 | + |
| 116 | +/* Responsive layout - makes a one column-layout instead of two or three columns */ |
| 117 | +@media screen and (max-width: 800px) { |
| 118 | + .column { |
| 119 | + flex: 50%; |
| 120 | + max-width: 50%; |
| 121 | +} |
| 122 | + |
| 123 | + |
| 124 | + |
| 125 | + |
| 126 | + |
| 127 | + |
| 128 | + |
| 129 | + |
| 130 | + |
| 131 | + |
| 132 | + |
| 133 | + |
0 commit comments