如何用CSS和HTML中的线条绘制连接的圆圈

时间:2014-02-19 08:54:45

标签: javascript html css

我想使用线作为连接器将圆与其他圆相连,每个圆应该包含超链接文本。使用CSS和html enter image description here

2 个答案:

答案 0 :(得分:2)

作为一个开始的想法,我可以为您提出以下概念:

<style>
a {
    border: 1px solid black;
    border-radius: 50%;
    display: block;
    width: 20px;
    height: 20px;
    padding: 5px;
    background: white;
}

#elementG {
    position: absolute;
    left: 150px;
    top: 100px;
}

#elementH {
    position: absolute;
    left: 70px;
    top: 150px;
}

#elementA {
    position: absolute;
    left: 20px;
    top: 80px;
}

b {
    border-bottom: 1px solid black;
    width: 70px;
    display: block;
    position: absolute;
}

#linkGA {
    -moz-transform: rotate(50deg);
    -webkit-transform: rotate(50deg);
    transform: rotate(50deg);
    left: 30px;
    top: 125px
}

#linkAH {
        -moz-transform: rotate(-35deg);
    -webkit-transform: rotate(-35deg);
    transform: rotate(-35deg);
    left: 87px;
    top: 135px
}
</style>

<b id="linkGA"></b>
<b id="linkAH"></b>
<a href="#" id="elementG">G</a>
<a href="#" id="elementA">A</a>
<a href="#" id="elementH">H</a>

答案 1 :(得分:1)

sigma.js框架可能比纯css选项更适合

http://sigmajs.org/

相关问题