Je me demandais comment je pouvais positionner des cercles ou des images dans un cercle. J'ai essayé de les positionner en les mettant dans un conteneur et en les faisant tourner autour d'un cercle, mais je n'arrive pas à trouver comment faire comme l'image ci-dessous :
.deg1 {
transform: rotate(270deg) translate(6em) rotate(-270deg);
top: 50px;
position: relative;
}
/* 1 */
.deg2 {
transform: translate(6em);
}
/* 2 */
.deg3 {
transform: rotate(45deg) translate(6em) rotate(-45deg);
}
/* 3 */
.deg4 {
transform: rotate(135deg) translate(6em) rotate(-135deg);
}
/* 4 */
.deg5 {
transform: translate(-6em);
}
/* 5 */
.deg6 {
transform: rotate(225deg) translate(6em) rotate(-225deg);
}
/* 6 */
.circle-container {
position: relative;
width: 24em;
height: 24em;
padding: 2.8em;
border-radius: 50%;
margin: 1.75em auto 0;
}
.circle-container a {
display: block;
position: absolute;
top: 50%;
left: 50%;
width: 4em;
height: 4em;
margin: -2em;
}
img {
border-radius: 400px;
width: 100px;
}
<div class='circle-container'>
<a href='#' class='center'><img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSp33aj-dlpojFqHXLPAQlQ9FH-su46mPBwEvFgi97RzuKoC0f1" %></a>
<a href='#' class='deg2'><img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSp33aj-dlpojFqHXLPAQlQ9FH-su46mPBwEvFgi97RzuKoC0f1" %></a>
<a href='#' class='deg3'><img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSp33aj-dlpojFqHXLPAQlQ9FH-su46mPBwEvFgi97RzuKoC0f1" %></a>
<a href='#' class='deg4'><img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSp33aj-dlpojFqHXLPAQlQ9FH-su46mPBwEvFgi97RzuKoC0f1" %></a>
<a href='#' class='deg5'><img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSp33aj-dlpojFqHXLPAQlQ9FH-su46mPBwEvFgi97RzuKoC0f1" %></a>
<a href='#' class='deg6'><img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSp33aj-dlpojFqHXLPAQlQ9FH-su46mPBwEvFgi97RzuKoC0f1" %></a>
<a href='#' class='deg1'><img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSp33aj-dlpojFqHXLPAQlQ9FH-su46mPBwEvFgi97RzuKoC0f1" %></a>
</div>
J'ai d'abord essayé de chercher dans la documentation de bootstrap quelque chose qui puisse m'aider. Je viens donc de faire cela et je n'arrive pas à trouver la solution.