Paul's Javascript Notes
Saturday, April 6, 2019
How to crop images using css
In style:
<
style
>
#test
{
width
:
100%
;
margin
:
-30%
0
;
}
<
/
style
>
About -30% means crop 30% vertically.
In body:
<
img
src
=
"images/pic1.jpg"
id
=
"test"
/>
That's it!
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment