+ 2
Quick move the svg picture
Hi friends! Tell me pls, how i can move smiley to the right (to the center) ? Only changing whole code of svg, or it is some quick solution? https://code.sololearn.com/WGILE9x4xi6O/#css https://code.sololearn.com/WGILE9x4xi6O/#html
4 odpowiedzi
+ 7
svg{
margin-left:100px;
}
+ 3
thanks Olga
+ 2
thank you sir!
+ 2
@Max Rubs
To position svg in the middle on a screen of any size
HTML
<div class="svgcenter">
<svg width="310" height="290">
<ellipse rx="75" ry="20" cx="150" cy="270" fill="lightgray"/>
<circle r="120" cx="150" cy="150" fill="gold"/>
<circle r="50" cx="100" cy="120" fill="white"/>
<circle r="50" cx="170" cy="120" fill="white"/>
<circle r="10" cx="170" cy="120" />
<circle r="10" cx="100" cy="120" />
<ellipse rx="10" ry="20" cx="135" cy="210" fill="crimson"/>
</svg>
</div>
CSS
.svgcenter {
display: flex;
justify-content: center;
}