Last active
November 27, 2017 11:02
-
-
Save robertocarroll/07a4de67164e391d9af9411db12597c4 to your computer and use it in GitHub Desktop.
WSAD CSS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
shadow on box | |
.scroll-story-banner::after { | |
content: ""; | |
position: absolute; | |
top: 100%; | |
left: 15px; | |
right: 15px; | |
width: auto; | |
height: 15px; | |
background: rgba(0,0,0,.2); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Text on link block | |
.link-block__text { | |
position: absolute; | |
left: 0; | |
bottom: 0; | |
right: 0; | |
margin: 0; | |
padding: 10px 15px; | |
background: rgba(0,0,0,0.6); | |
font-weight: bold; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Centre image inside a box | |
<div class="country__flag"> | |
<div class="country__flag__inner"> | |
<img src="https://images.worldskillsusercontent.org/ws13/ws66/11739/ws13663047-a57f-4f18-b4c5-3ed8052742c3_small" alt=""> </div> | |
</div> | |
.country__flag { | |
position: relative; | |
width: 100%; | |
margin-bottom: .5rem; | |
height: 0; | |
padding-bottom: 100%; | |
background: #ccc; | |
} | |
.country__flag__inner { | |
position: absolute; | |
top: 2em; | |
bottom: 2em; | |
left: 2em; | |
right: 2em; | |
width: auto; | |
height: auto; | |
display: flex; | |
align-items: center; | |
justify-content: center; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment