Last active
December 16, 2015 10:58
-
-
Save adeleinr/5423774 to your computer and use it in GitHub Desktop.
CSS Cheatsheet
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
Center an image in a div | |
======================== | |
.person .person-avatar-medium { | |
width: 80px; | |
height: 80px; | |
overflow: hidden; | |
background-color: #f2f2f0; | |
-webkit-border-radius: 100%; | |
-moz-border-radius: 100%; | |
border-radius: 100%; | |
display: block; | |
margin-left: auto; | |
margin-right: auto; | |
} | |
Center the contents of a div | |
============================ | |
person{ | |
margin:auto; | |
} | |
Gray out an image | |
================ | |
.person img:hover{ | |
-webkit-filter: grayscale(100%); | |
-moz-filter: grayscale(100%); | |
-o-filter: grayscale(100%); | |
-ms-filter: grayscale(100%); | |
filter: grayscale(100%); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment