【发布时间】:2021-03-04 21:00:55
【问题描述】:
我正在尝试使用 html 和 css 创建一个带有 6 个径向的圆形菜单。我只得到 6 个总径向线(边界)中的 5 个。我需要得到最后一个径向,在 item5 和 item6 之间。我需要得到相同的图片:
HTML
<div id="menu">
<div class="item1 item">
<div class="content"><a href="#one">Solución Aula Digital</a></div>
</div>
<div class="item2 item">
<div class="content"><a href="#two">Live Streaming</a></div>
</div>
<div class="item3 item">
<div class="content"><a href="#three">Social Tecal Online</a></div>
</div>
<div class="item4 item">
<div class="content"><a href="#four">FlexScorn</a></div>
</div>
<div class="item5 item">
<div class="content"><a href="#five">Video On Demand</a></div>
</div>
<div id="wrapper6">
<div class="item6 item">
<div class="content"><a href="#six">Video Colaboración</a></div>
</div>
</div>
<div id="center">
<a href="#"></a>
</div>
</div>
CSS
#menu {
background: #aaa;
position: relative;
width: 300px;
height: 300px;
margin: 0 auto;
overflow: hidden;
border-radius: 155px;
-moz-border-radius: 100%;
-webkit-border-radius: 100%;
}
#center {
position: absolute;
left: 60px;
top: 60px;
width: 180px;
height: 180px;
z-index: 10;
background: #FFFFFF;
border-radius: 100px;
-moz-border-radius: 100px;
-webkit-border-radius: 100px;
}
#center a {
display: block;
width: 100%;
height: 100%
}
.item {
background: #aaa;
overflow: hidden;
position: absolute;
transform-origin: 100% 100%;
-moz-transform-origin: 100% 100%;
-webkit-transform-origin: 100% 100%;
transition: background .5s;
-moz-transition: background .5s;
-webkit-transition: background .5s;
-o-transition: background .5s;
-ms-transition: background .5s;
border: 3px solid #FFFFFF;
}
.item:hover {
background: #eee
}
.item1 {
z-index: 1;
transform: rotate(60deg);
-moz-transform: rotate(60deg);
-webkit-transform: rotate(60deg);
width: 134px;
height: 134px;
}
.item2 {
z-index: 2;
transform: rotate(120deg);
-moz-transform: rotate(120deg);
-webkit-transform: rotate(120deg);
width: 150px;
height: 150px;
}
.item3 {
z-index: 3;
transform: rotate(180deg);
-moz-transform: rotate(180deg);
-webkit-transform: rotate(180deg);
width: 150px;
height: 150px;
}
.item4 {
z-index: 4;
transform: rotate(240deg);
-moz-transform: rotate(240deg);
-webkit-transform: rotate(240deg);
width: 152px;
height: 152px;
}
.item5 {
z-index: 5;
transform: rotate(300deg);
-moz-transform: rotate(300deg);
-webkit-transform: rotate(300deg);
width: 151px;
height: 151px;
}
.item6 {
border: none;
position: absolute;
z-index: 6;
transform: rotate(-30deg);
-moz-transform: rotate(-30deg);
-webkit-transform: rotate(-30deg);
width: 140px;
height: 140px;
}
#wrapper6 {
position: absolute;
width: 160px;
height: 160px;
overflow: hidden;
transform-origin: 100% 100%;
-moz-transform-origin: 100% 100%;
-webkit-transform-origin: 100% 100%;
/*border: 2px solid #FFFFFF;*/
}
.item1 .content {
left: 0px;
top: 17px;
transform: rotate(-60deg);
-moz-transform: rotate(-60deg);
-webkit-transform: rotate(-60deg);
}
.item2 .content {
left: -5px;
top: 31px;
transform: rotate(-59deg);
-moz-transform: rotate(-59deg);
-webkit-transform: rotate(-59deg);
}
.item3 .content {
left: -40px;
top: 8px;
transform: rotate(-237deg);
-moz-transform: rotate(-237deg);
-webkit-transform: rotate(-237deg);
}
.item4 .content {
left: -43px;
top: 4px;
transform: rotate(-240deg);
-moz-transform: rotate(-240deg);
-webkit-transform: rotate(-240deg);
}
.item5 .content {
left: -52px;
top: 7px;
transform: rotate(-247deg);
-moz-transform: rotate(-247deg);
-webkit-transform: rotate(-247deg);
}
.item6 .content {
left: 26px;
top: -3px;
transform: rotate(-29deg);
-moz-transform: rotate(-29deg);
-webkit-transform: rotate(-29deg);
}
.content, .content a {
width: 100%;
height: 100%;
text-align: center
}
.content {
position: absolute;
}
.content a {
line-height: 100px;
display: block;
position: absolute;
text-decoration: none;
font-family: 'Segoe UI', Arial, Verdana, sans-serif;
font-size: 12px;
/*text-shadow: 1px 1px #eee;
text-shadow: 0 0 5px #fff, 0 0 5px #fff, 0 0 5px #fff*/
}
.display-target {
display: none;
text-align: center;
opacity: 0;
}
.display-target:target {
display: block;
opacity: 1;
animation: fade-in 1s;
-moz-animation: fade-in 1s;
-webkit-animation: fade-in 1s;
-o-animation: fade-in 1s;
-ms-animation: fade-in 1s;
}
@keyframes fade-in {
from { opacity: 0 }
to { opacity: 1 }
}
@-moz-keyframes fade-in {
from { opacity: 0 }
to { opacity: 1 }
}
@-webkit-keyframes fade-in {
from { opacity: 0 }
to { opacity: 1 }
}
@-o-keyframes fade-in {
from { opacity: 0 }
to { opacity: 1 }
}
@-ms-keyframes fade-in {
from { opacity: 0 }
to { opacity: 1 }
}
【问题讨论】:
-
不重复,不一样
-
对不起,但那句话:“我需要得到最后一个白色径向,在 item5 和 item6 之间。”在这两个问题中。这让我觉得你在问同样的问题(得到白色径向),不是吗?
-
你必须阅读所有的cmets,然后你就会明白为什么一个新问题
-
正如我现在所看到的,您已将旧问题更改为也询问白色边框?请,如果您已经将此作为其他问题发布,请恢复对原始问题的编辑,否则答案对新用户毫无意义...