1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101
|
body {
font-family: Calibri, Arial
}
.parent {
display: flex;
height: 100px;
margin: 50px 0;
padding: 2px;
background-color: blue;
color: orange;
font-weight: bold;
font-size: 3em;
text-align: center;
text-transform: uppercase
}
.child {
width: 100px;
height: 100px;
margin: auto; /* Magic! */
}
.flex-container {
padding: 0;
margin: 0;
list-style: none;
display: -webkit-box;
display: -moz-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
-webkit-flex-flow: row wrap;
justify-content: space-around;
}
.flex-item {
background: tomato;
padding: 5px;
width: 220px;
height: 150px;
margin-top: 10px;
line-height: 150px;
color: white;
font-weight: bold;
font-size: 2em;
text-align: center;
}
.navigation {
list-style: none;
margin: 0;
background: deepskyblue;
display: -webkit-box;
display: -moz-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
-webkit-flex-flow: row wrap;
justify-content: flex-end
}
.navigation a {
display: block;
text-decoration: none;
color: white;
padding: 1em
}
.navigation a:hover{
background: rgb(102, 204, 255)
}
@media all and (max-width: 800px) {
.navigation {
justify-content: space-around
}}
@media all and (max-width: 600px) {
.navigation {
-webkit-flex-flow: column wrap;
flex-flow: column wrap;
padding: 0
}
.navigation a {
text-align: center;
padding: 10px;
border-top: 1px solid rgba(255,255,255,0.3);
border-bottom: 1px solid rgba(0,0,0,0.1)
}
.navigation li:last-of-type a {
border-bottom: none
}
} |
Partager