earthjs
Version:
D3 Earth JS using SVG, Canvas & THREE js, build with some plugins.
70 lines (68 loc) • 1.3 kB
CSS
#x10 {display: none;}
#title {
left: 50%;
top: 10px;
position: absolute;
transform: translateX(-50%);
text-align: center;
cursor: pointer;
z-index: 5;
}
.svg-container {
position: relative;
margin-top: 50px;
}
.color-range {
position: absolute;
width: 44px;
z-index: 3;
}
.color-range-item {
border: 1px solid black;
cursor: pointer;
display: inline-block;
padding: 2px 0;
text-align: center;
width: 44px;
}
.color-range-item.selected {
border: 3px solid #c7c100;
width: 40px;
}
.color-countries {
position: absolute;
cursor: default;
z-index: 3;
right: 0;
font-size: 0.6em;
text-align: right;
font-family: monospace;
padding: 0 10px 0 0;
}
.color-countries-item:hover {
text-decoration: underline;
}
.countries path {
cursor: pointer;
fill: #d6d5d5;
opacity: 1;
}
.countries path.selected {
stroke-width: 2px;
stroke: #c7c100 ;
}
.selected-country {
display: none;
padding: 10px;
position: absolute;
background-color: rgba(250,250,200,0.5);
border: 1px solid red;
border-radius: 5px;
top: 50%;
left: 8px;
transform: translateY(-50%);
z-index: 5;
}
.color-countries-item.selected {
border: 3px solid #c7c100;
}