Quantcast
Channel: User FoxInFlame - Stack Overflow
Viewing all articles
Browse latest Browse all 35

Answer by FoxInFlame for Selecting just the middle section of an image with CSS

$
0
0

Try this.This is using "clip-path" CSS value. This was mentioned in @Sam Jacob's post.

<style>.clip-me {    position: absolute;  clip: rect(110px, 160px, 170px, 60px);   /* values describe a top/left point and bottom/right point */  clip-path: inset(10px 20px 30px 40px); /* or "none" */  /* values are from-top, from-right, from-bottom, from-left */} </style><img class="clip-me" src="thing-to-be-clipped.png">

Note: This CSS property does not work in IE.


Viewing all articles
Browse latest Browse all 35

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>