css3으로 곡선/호 스타일 메뉴를 만들 수 있습니까?css3에서 커브 스타일 메뉴를 만드는 방법은 무엇입니까?
나는 HTML5에서이 사용 캔버스 또는 무언가를 얻을 수 있습니까? 사전에
감사합니다, 로건
css3으로 곡선/호 스타일 메뉴를 만들 수 있습니까?css3에서 커브 스타일 메뉴를 만드는 방법은 무엇입니까?
나는 HTML5에서이 사용 캔버스 또는 무언가를 얻을 수 있습니까? 사전에
감사합니다, 로건
몇 HTML 집단.
어쩌면 이것은 당신을 시작할 수 있습니다.
HTML
<div class="container">
<div class="gray"></div>
<div class="white"></div>
</div>
CSS
.container {
height: 200px;
overflow: hidden;
position: relative;
}
.gray,
.white {
position: absolute;
left: -25%;
right: -25%;
border-radius: 100%;
}
.gray { /* use a gray border with border radius to emulate an arc */
top: -50%;
border:100px solid gray;
border-top: none;
height: 200px;
}
.white { /* put a white oval on top for the top edge of the banner */
top: -80%;
background-color: white;
height: 300px;
}
도전은 이제 모든 메뉴 항목과 rotate them accordingly를 배치하는 것입니다 ... 난 몰라 실용적인 솔트로서 이것을 정말로 보아라. 이온, 그러나 나는 당신이 유용하다고 생각할 수 있기를 빌어 어쨌든 글을 올리고있다.
SVG을 사용하면 curve text을 사용할 수 있으며 아마도이 작업에 더 적합한 도구 일 수 있습니다. 여기에 편집
SVG
<svg viewBox="0 0 500 300" version="1.1">
<defs>
<!-- Start at (10,40) end at (490,40) use control point (250 ,85) -->
<path id="curvetext" d="M 10,40 Q 250,85 490,40" />
</defs>
<use x="0" y="0" xlink:href="#curvetext" fill="none" stroke="gray" stroke-width="50"/>
<text font-size="12" fill="white">
<textPath xlink:href="#curvetext">
<a xlink:href="http://example.com">Menu 1</a> Menu 2 Menu 3 Menu 4 Menu 5 Menu 6 Menu 7 Menu 8 Menu 9
</textPath>
</text>
</svg>
SVG 데모에서 : http://jsfiddle.net/rNLsr/2/
이 스레드에서보세요 http://stackoverflow.com/questions/2840862/is-there-a-way-to-curve-arc-text-using-css3-canvas –
네, 그런 곡선 메뉴를 할 수 있습니다 - 내 대답을 확인하십시오. 질문 : http://stackoverflow.com/questions/13132864/circular-tooltip/ – Ana
@Ana 정말 멋지다! – xec