show central part of rectangle image css
.thumbnail {
position: relative;
width: 200px;
height: 200px;
overflow: hidden;
}
.thumbnail img {
position: absolute;
left: 50%;
top: 50%;
height: 100%;
width: auto;
-webkit-transform: translate(-50%,-50%);
-ms-transform: translate(-50%,-50%);
transform: translate(-50%,-50%);
}
.thumbnail img.portrait {
width: 100%;
height: auto;
}
Also in CSS:
- ancho maximo css
- css id selector
- css thinner hr
- @media css
- css scaling border radius
- css vertical center
- how to create polaroid effect in css
- remove border radius select css
- como trocar ordem dos elementos pelo dispositivo html
- xcrun: error: SDK "iphoneos" cannot be located
- scss gradient mixin
- media types in css
- add a border to a div css
- css keyframes animation
- css translate3d
- nice button css
- how to scroll fixed position
- css doesnt update
- general sibling selector
- textarea placeholder
- css ripple effect
- css all children of type
- bootstrap font size
- display flex css