L
L
ligisayan2015-08-26 11:05:31
css
ligisayan, 2015-08-26 11:05:31

How to get only the central part when reducing the size of the image?

Hello. There is a picture:

<img src="http://www.personal.psu.edu/jul229/mini.jpg" alt="">

How to make it so that when its size is reduced, for example, 150 by 150, only its central part (with minions) is taken as the basis, and the insignificant part is discarded, preferably without the use of scripts.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Andrey B., 2015-08-26
@ligisayan

codepen.io/anon/pen/bdXyKo?editors=110 but there are some restrictions

S
SerzN1, 2015-10-30
@SerzN1

a typical example of centering an image in a block of a given size (possible as a percentage)
jsfiddle.net/SerzN1/s3fLutz5/1

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question