CSS
语言:
CSSSCSS
确定
.full-width {
/* setting padding left and right here will keep your content from spanning the entire container */
/* avoid setting padding in shorthand elsewhere to prevent overriding*/
margin: 0 calc(0px - (100vw - 100%) / 2);
padding-left: calc((100vw - 100%) / 2);
padding-right: calc((100vw - 100%) / 2);
}
section {
background-color: #ddd;
margin: 0 auto;
/* adjust the container width here to change the content area width. This works with any unit */
padding: 20px;
width: 60%;
}
h2 {
color: #fff;
text-shadow: 1px 1px 1px #000;
/* background images work */
font-size: 2em;
background-image: url("/assets/landing.jpg");
/* padding top and bottom work */
background-size: cover;
padding-top: 2em;
/* borders work */
padding-bottom: 2em;
border-style: solid;
border-color: #fff;
/* box shadows */
border-width: 8px 0;
/* outline */
box-shadow: 0 0 20px #000;
outline: 1px solid #333;
}
.closing {
background-color: rgba(255, 255, 255, 0.3);
padding-top: 0.5em;
padding-bottom: 0.5em;
margin-top: 5px;
}
body {
background-color: #333;
font-family: sans-serif;
margin: 0;
}