How to crop an image (600x450) and create a frame on it using CSS?
in
Is it possible? Which is better to use? Create some wrapper element with border radius?
I think this is the best you can do with css:
CSS
img { width:400px; height:400px; border-top-left-radius:50% 50px; border-top-right-radius:50% 50px; border-bottom-left-radius:50%; border-bottom-right-radius:50%; }
http://jsfiddle.net/andyfurniss/rmc4nuu7/
Then just add a white frame and box-shadow.
box-shadow
<style> #img{ border-bottom-left-radius: 50%; border-bottom-right-radius: 50%; border-top-right-radius: 10%; border-top-right-radius: 10%; width: 600px; height: 450px; } </style>
@Phylogenesis , , .
hieght, :
#mask img { margin-left: 50%; transform:translate(-50%, 0); border-bottom-left-radius:100%; border-bottom-right-radius:100%; }
Source: https://habr.com/ru/post/1609985/More articles:Android Google Map does not load in activity small layout - androidMultiple cores in one program compared to one core per program - openclCenter the last element or second element - htmlViewport - jQuery selector for searching elements in viewport - javascriptCopy paste from PDF is gibberish in the source file, but fixed when printing PDF using CutePDF - javaКогда язык будет называться, что он полностью объектно-ориентированный язык? - javaHow to create a placeholder image in HTML if the original image was not found? - htmljavascript: onload and onerror are called together - javascriptCMake cannot identify C compiler from installed Visual Studio 2015 - visual-studio-2015Clean HTML export buttons in jQuery data table - html5All Articles