Tell me, please, how to create such an arrangement of icons?
If you look closely, there are clickable icons around the circle (white background with several circles) ...
I have no ideas at all.
Tell me, please, how to create such an arrangement of icons?
If you look closely, there are clickable icons around the circle (white background with several circles) ...
I have no ideas at all.
I add a new answer, because the application is almost completely rewritten and I do not know which solution will suit the author more.
What has been done again:
All variable parameters are converted to percentages to achieve full adaptability.
A block of circles that provides a round base with an icon with a shadow is transferred to the <defs> section for repeated use with the <use> command
width and height values from the SVG header for adaptability<div> , which allows you to change the size of the svg block, changing the percentages of the width and height of the parent <div> .To adjust the size and intensity of the shadow, increase or decrease the radii of the two circles relative to each other. Also for this purpose, you can change the attribute stdDeviation="4" filter
.container { width:100%; height:100% } <div class="container"> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 1200 1200" preserveAspectRatio="xMinYMin meet" > <defs> <filter id="dropshadow" width="130%" height="130%"> <feGaussianBlur in="SourceAlpha" stdDeviation="4"/> <feOffset dx="0" dy="2" result="offsetblur"/> </filter> <g id="icon" fill="#fff"> <circle cx="0" cy="0" r="2.5%" filter="url(#dropshadow)"/> <circle cx="0" cy="0" r="2.7%" /> </g> </defs> <use xlink:href="#icon" x="120px" y="120px" /> <a xlink:href="https://yandex.ru/"> <image xlink:href="https://i.stack.imgur.com/P6Rbo.png" x="96px" y="96px" width="4%" height="4%" /> </a> <use xlink:href="#icon" x="1000px" y="120px"/> <a xlink:href="https://yandex.ru/"> <image xlink:href="https://i.stack.imgur.com/P6Rbo.png" x="976px" y="96px" width="4%" height="4%" /> </a> <use xlink:href="#icon" x="530" y="200"/> <a xlink:href="https://codepen.io/"> <image xlink:href="https://i.stack.imgur.com/oEW1L.png" x="497px" y="165px" width="5.5%" height="5.5%" /> </a> <use xlink:href="#icon" x="310" y="148"/> <a xlink:href="https://jsfiddle.net/"> <image xlink:href="https://i.stack.imgur.com/y06Su.png" x="280px" y="118px" width="5%" height="5%" /> </a> <use xlink:href="#icon" x="760" y="148"/> <a xlink:href="https://jsfiddle.net/"> <image xlink:href="https://i.stack.imgur.com/y06Su.png" x="730px" y="118px" width="5%" height="5%" /> </a> </svg> </div> To implement the shadow, two circles are used, one above the other.
A Gaussian filter is applied to the lower circle. Using the attributes of this filter, you can finely adjust the saturation and position of the shadow. stdDeviation="4" dx="0" dy="2" I did as the author of the question. If you need to change something in the appearance of the shadow, change these attributes and the radii of the circles.
<image> inside the svg file. This ensures that the icon and the circle with a shadow do not go away when the scale changes.<use xlink:href="#icon" x="20" y="100"/>
<image><image xlink:href="Safari.png" x="90px" y="170px" width="15%" height="15%" />
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="400" height="400" viewBox="0 0 400 400"> <defs> <filter id="dropshadow" width="130%" height="130%"> <feGaussianBlur in="SourceAlpha" stdDeviation="4"/> <feOffset dx="0" dy="2" result="offsetblur"/> <feMerge> <feMergeNode/> <feMergeNode in="SourceGraphic"/> </feMerge> </filter> </defs> <g id="icon"> <circle cx="100" cy="100" r="30" fill="#FFFFFF" filter="url(#dropshadow)"/> <circle cx="100" cy="100" r="35" fill="#FFFFFF" /> </g> <use xlink:href="#icon" x="150" y="50"/> <image xlink:href="https://i.stack.imgur.com/P6Rbo.png" x="75px" y="76px" width="12%" height="12%" /> <use xlink:href="#icon" x="20" y="100"/> <image xlink:href="https://i.stack.imgur.com/oEW1L.png" x="90px" y="170px" width="15%" height="15%" /> <image xlink:href="https://i.stack.imgur.com/y06Su.png" x="220px" y="120px" width="15%" height="15%" /> </svg> It goes without saying that there is no specific algorithm for how to arrange these elements.
I showed only one part for directing in the right direction
Next in steps ... one unit in it is descendants ... and by such an example and how many descendants are needed ...
The necessary rule for this: transform: origin (x, y, z); and correct positioning
But of course it’s better to use svg for this.
* { margin: 0; padding: 0; } .items { width: 330px; height: 330px; margin: 90px auto; border: 1px solid red; position: relative; border-radius: 50%; } .items>div { position: absolute; top: -20%; left: 35%; transform-origin: 50% 230% 0; width: 100px; height: 100px; border-radius: 50%; } .item1 { background: red; transform: rotate(0deg); } .item2 { background: green; transform: rotate(-90deg); } .item3 { background: blue; transform: rotate(90deg); } .item4 { background: orange; transform: rotate(180deg); } <div class="items"> <div class="item1"> </div> <div class="item2"> </div> <div class="item3"> </div> <div class="item4"> </div> </div> Source: https://ru.stackoverflow.com/questions/813457/
All Articles